<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" style="" class=" js no-touch localstorage" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Web POS</title>
<meta name="description" content="Default Description">
<meta name="keywords" content="Magento, Varien, E-commerce">
<meta name="robots" content="INDEX,FOLLOW">
<script type="text/javascript" src="http://demo.magestore.com/webpos/js/prototype/prototype.js"></script>



<script src="./templates/js/jquery-1.9.1.min.js"></script>
<script src="./templates/js/ecshop.js"></script>
<script src="./templates/js/checkout.js"></script>
<script src="./templates/js/order.js"></script>

<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!--[if lt IE 7]>
<script type="text/javascript">
//<![CDATA[
    var BLANK_URL = 'http://demo.magestore.com/webpos/js/blank.html';
    var BLANK_IMG = 'http://demo.magestore.com/webpos/js/spacer.gif';
//]]>
</script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="./templates/js/calendar/calendar-win2k-1.css">
<link rel="stylesheet" type="text/css" href="./templates/css/default.css">
<link rel="stylesheet" type="text/css" href="./templates/css/demoheader.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/style.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/demotip.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/webpos23.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/jquery.mmenu.all.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/jquery-ui.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/jquery-ui-timepicker.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/orderlist.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/bootstrap.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/bootstrap2-toggle.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/login.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/webpos22.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/tinybox.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/rewardpoints.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/rewardpoints_new.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/webpos234.css" media="all">
<link rel="stylesheet" type="text/css" href="./templates/css/ecshop.css" media="all">
<script type="text/javascript" async="" src="about:blank"></script>
<script async="" src="about:blank"></script>
<script type="text/javascript" src="about:blank"></script>

    <!-- Include all compiled plugins (below), or include individual files as needed -->
   <script src="./templates/js/bootstrap1.min.js"></script>

  <script src="./templates/js/calendar/calendar.js"></script>
  <script src="./templates/js/calendar/calendar-setup.js"></script>


<!--[if  (lte IE 8) & (!IEMobile)]>
<link rel="stylesheet" type="text/css" href="http://demo.magestore.com/webpos/skin/frontend/rwd/default/css/styles-ie8.css" media="all" />
<link rel="stylesheet" type="text/css" href="http://demo.magestore.com/webpos/skin/frontend/rwd/default/css/madisonisland-ie8.css" media="all" />
<![endif]-->
<!--[if (gte IE 9) | (IEMobile)]><!-->
<link rel="stylesheet" type="text/css" href="madisonisland.css" media="all">
<!--<![endif]-->

<script type="text/javascript">/* Code removed by ScrapBook */</script>
<meta name="viewport" content="initial-scale=1.0, width=device-width">

<script type="text/javascript">/* Code removed by ScrapBook */</script>
<script type="text/javascript">/* Code removed by ScrapBook */</script>
<!--Google analytic by Harry-->
<script>/* Code removed by ScrapBook */</script>
<!--End Google analytic-->
<style src="text/css">
@keyframes xs{
    from {left: -100vw;}
    to {left: 100px;}
}

@-webkit-keyframes xs /* Safari 与 Chrome */
{
    from {left: -100vw;}
    to {left: 100px;}
}

   @keyframes yc{
    from {left: 100px;}
    to {left: -100vw;}
}

@-webkit-keyframes yc /* Safari 与 Chrome */
{
     from {left: 100px;}
     to {left: -100vw;}
}




.xs{
    
     animation: xs 1s;
    -webkit-animation: xs 1s; /* Safari 与 Chrome */
    animation-fill-mode : forwards;
   -webkit-animation-fill-mode : forwards ;
 
}


.yc{
	 animation: yc 1s;
	 -webkit-animation: yc 1s; /* Safari 与 Chrome */
          animation-fill-mode : forwards;
        -webkit-animation-fill-mode : forwards ;
}
  
.ys{

	color:red;
	
}  
    
</style>

{insert_scripts files="./js/transportNew.js"}
{insert_scripts files="../js/region.js"}

<script type="text/javascript">
var result; //保存点击运算符之前输入框中的数值
var operator; //保存运算符
var isPressEqualsKey = false; //记录是否按下”=“键
//数字键事件
function connectionDigital(control)
{
var txt = document.getElementById('txtScream');
if(isPressEqualsKey)
{ 
txt.value = ""; //已进行过计算，则清空数值输入框重新开始
isPressEqualsKey = false;
}
//数值输入已经存在小数点,则不允许再输入小数点
if(txt.value.indexOf('.') > -1 && control.value == '.')
return false;
txt.value += control.value; //将控件值赋给数值输入框中
}
//退格键事件
function backspace()
{
var txt = document.getElementById('txtScream');
txt.value = txt.value.substring(0,txt.value.length - 1);
}
//ce键事件：清空数字输入框
function clearAll()
{
document.getElementById('txtScream').value = "";
result = "";
operator = "";
}
// +、-、*、/ 事件
function calculation(control)
{
//将运算符保存入全局变量中
operator = control.value; 
var txt = document.getElementById('txtScream');
if(txt.value == "")return false; //数值输入框中没有数字，则不能输入运算符
//将数值输入框中的值保存到计算表达式中
result = txt.value; 
//清空输入框，以待输入操作值
txt.value = ""; 
}
//计算结果
function getResult()
{
var opValue;
//计算表达式中存在运算符
var sourseValue = parseFloat(result);
var txt = document.getElementById('txtScream');
if(operator == '*')
opValue = sourseValue * parseFloat(txt.value);
else if(operator == '/')
opValue = sourseValue / parseFloat(txt.value);
else if(operator == '+')
opValue = sourseValue + parseFloat(txt.value);
else if(operator == '-')
opValue = sourseValue - parseFloat(txt.value);
txt.value = opValue;
isPressEqualsKey = true;
result = "";
opValue = "";
}
</script>




<script type="text/javascript">
   //添加购物车折扣计算器
var result1; //保存点击运算符之前输入框中的数值
var operator1; //保存运算符
var isPressEqualsKey1 = false; //记录是否按下”=“键
//数字键事件
function connectionDigital1(control1)
{
var txt1 = document.getElementById('txtScream1');
if(isPressEqualsKey1)
{ 
txt1.value = ""; //已进行过计算，则清空数值输入框重新开始
isPressEqualsKey1 = false;
}
//数值输入已经存在小数点,则不允许再输入小数点
if(txt1.value.indexOf('.') > -1 && control1.value == '.')
return false;
txt1.value += control1.value; //将控件值赋给数值输入框中
}
//退格键事件
function backspace1()
{
var txt1 = document.getElementById('txtScream1');
txt1.value = txt1.value.substring(0,txt1.value.length - 1);
}
//ce键事件：清空数字输入框
function clearAll1()
{
document.getElementById('txtScream1').value = "";
result1 = "";
operator1 = "";
}
// +、-、*、/ 事件
function calculation1(control1)
{
//将运算符保存入全局变量中
operator1 = control1.value; 
var txt1 = document.getElementById('txtScream1');
if(txt1.value == "")return false; //数值输入框中没有数字，则不能输入运算符
//将数值输入框中的值保存到计算表达式中
result1 = txt1.value; 
//清空输入框，以待输入操作值
txt1.value = ""; 
}
//计算结果
function getResult1()
{
var opValue1;
//计算表达式中存在运算符
var sourseValue1 = parseFloat(result1);
var txt1 = document.getElementById('txtScream1');
if(operator1 == '*')
opValue1 = sourseValue1 * parseFloat(txt1.value);
else if(operator1 == '/')
opValue1 = sourseValue1 / parseFloat(txt1.value);
else if(operator1 == '+')
opValue1 = sourseValue1 + parseFloat(txt1.value);
else if(operator1 == '-')
opValue1 = sourseValue1 - parseFloat(txt1.value);
txt1.value = opValue1;
isPressEqualsKey1 = true;
result1 = "";
opValue1 = "";
}
</script>

<script>
    function menuClick(el) {
    
    if (el.id != '') {
        
         if (el.id == 'checkout') {
          //结账操作
            var menuobj= document.getElementById(el.id);
            showActiveMenu(menuobj);
           /*var orders_area= document.getElementById("orders_area");
           orders_area.style.left="-100vw";
           order_area.style.zIndex=0;
           
         var classVal= document.getElementById("orders_area").getAttribute("class");
             classVal = classVal.replace(" showing show","");
              orders_area.setAttribute("class",classVal );
              orders_area.style.width="668px";*/
        /*逻辑部分*/
        document.getElementById("settings_area").style.display="none";
        document.getElementById("settings_area").style.zIndex=1;
        
        
        document.getElementById("reports_area").style.display="none";
        document.getElementById("reports_area").style.zIndex=1;
        
                
        document.getElementById("cashdrawer_area").style.display="none";
        document.getElementById("cashdrawer_area").style.zIndex=1;
        
                        
        document.getElementById("orders_area").style.display="none";
        document.getElementById("orders_area").style.zIndex=1;
        
        document.getElementById("holded_orders_section").style.display="none";
        document.getElementById("holded_orders_section").style.zIndex=1;
        $('#holded_orders_detail').css('right','-100vw');  //关闭持有订单详情

        $('.box-logout').hide();
        $('#webpos_medium_overlay').hide();

      }

        
        if (el.id == 'orders') {
            //订单操作
           var menuobj= document.getElementById(el.id);
           showActiveMenu(menuobj);
           var orders_area_obj=document.getElementById("orders_area");
       orders_area_obj.style.background="#fff";
       orders_area_obj.style.display="block";
       orders_area_obj.style.zIndex=12;
      
      
      
           //var classVal = document.getElementById("orders_area").getAttribute("class");
          /*if(!/showing show/.test(classVal)){
          classVal = classVal.concat(" showing show");
           orders_area_obj.style.left="100px";
          document.getElementById("orders_area").setAttribute("class",classVal );
          orders_area_obj.style.background="#fff";
          }else{
              classVal = classVal.replace(" showing show","");
              orders_area_obj.setAttribute("class",classVal );
              orders_area_obj.style.width="668px";
          }*/

       $('#settings_area').hide();
       $('#webpos_medium_overlay').hide();
          

        }
        
      
      
      if (el.id == 'holded_orders') {
          //持有订单操作

           var menuobj= document.getElementById(el.id);
           showActiveMenu(menuobj);
       /*逻辑部分*/
          var orders_area_obj=document.getElementById("orders_area").style.display="none";
       
          var holded_orders_section=document.getElementById("holded_orders_section");
         
          holded_orders_section.style.display="block";


           $('#holded_orders_section').css('zIndex',12);

           $('#holded_orders_section').width($('#product-left').width());
           $('#holded_orders_list_grid').width($('#product-left').width());
          $('#cashdrawer_area').hide();
          //hjl  显示遮罩层
          $('#webpos_medium_overlay').show();
      
    
           
          
      }
      
       if (el.id == 'cash_drawer') {
           //钱箱操作
           
           var menuobj= document.getElementById(el.id);
           showActiveMenu(menuobj);
           var cashdrawer_area=document.getElementById("cashdrawer_area");
          cashdrawer_area.style.display="block";
           $('#cashdrawer_area').width($('#product-left').width()-2);
           //cashdrawer_area.style.width="388px";
             cashdrawer_area.style.zIndex=12;
              cashdrawer_area.style.left="100px";
                cashdrawer_area.style.top=0;

              $('#orders_area').hide();
              $('#reports_area').hide();
             $('#holded_orders_detail').css('right','-100vw');  //关闭持有订单详情

              //hjl  显示遮罩层
          $('#webpos_medium_overlay').show();

      }
      
      if (el.id == 'reports') {
           //报告操作
           
           var menuobj= document.getElementById(el.id);
           showActiveMenu(menuobj);
           var reports_area=document.getElementById("reports_area");
          reports_area.style.display = "block";
          reports_area.style.zIndex = 12;
          reports_area.style.left="99px";
          //reports_area.style.width="388px";
          $('#reports_area').width($('#product-left').width()-2);
          $('#settings_area').hide();
           //hjl  显示遮罩层
          $('#webpos_medium_overlay').show();
          
      }
      
          if (el.id == 'settings') {
           //设置操作
           var menuobj= document.getElementById(el.id);
           showActiveMenu(menuobj);
           var settings_area_obj=document.getElementById("settings_area");
            settings_area_obj.style.display="block";
            settings_area_obj.style.zIndex = 12;
            settings_area_obj.style.left="99px";
            settings_area_obj.style.background="#fff";

           $('#reports_area').hide();
           $('#cashdrawer_area').hide();
           $('#holded_orders_section').hide();
            $('#webpos_medium_overlay').hide();
      }
      

  }
}
    
 
function showActiveMenu(obj){
    var buts=getClassNames("menu_item","li");
    for(var i=1;i< buts.length;i++){
        var classVal = buts[i].getAttribute("class");
        classVal = classVal.replace("menuactive","");
        buts[i].setAttribute("class",classVal );
               
     }
       
    var classVal= obj.getAttribute("class");
    classVal = classVal.concat(" menuactive");
    obj.setAttribute("class",classVal );
    
}
function myyc(obj){
    var classVal=obj.getAttribute("class");
    if(!/yc/.test(classVal)){
    classVal = classVal.replace(/ xs/g, "");
    classVal = classVal.concat(" yc"); 
    obj.setAttribute("class",classVal );
    }         
  
    
}
function myxs(obj){
     var classVal=obj.getAttribute("class");

    classVal = classVal.replace(/ yc/g, "");

    classVal = classVal.concat(" xs"); 

    obj.setAttribute("class",classVal );
   
}
function orders_areatoggle(obj){
 
    var classVal=obj.getAttribute("class");
    if(/show/.test(classVal)){
             if(!/yc/.test(classVal)){
            /*隐藏处理*/
               classVal = classVal.replace(/ show showing xs/, "");
                 classVal = classVal.concat(" yc"); 
               obj.setAttribute("class",classVal );
               }
           }else{
              /*显示代码*/    
              
              classVal = classVal.replace(/ yc/g, "");
            
              classVal = classVal.concat(" show showing xs"); 
             
              obj.setAttribute("class",classVal );
              obj.style.background="#fff";
              obj.style.zIndex=13;

           }
    
}
function checkoutToggle(obj){
    var classVal=obj.getAttribute("class");
    
    /*if(classVal==""){


    }*/
    
}




//弹出规格框
  function checkgg(goodsId,num){
      
	  if(num > 0){
	  
		 document.getElementById(goodsId+"_options_popup").style.display="block";
		document.getElementById("webpos_overlay").style.display="block";
	  }else{
	  
		addToCart(goodsId);
    $('#footer_right_overlay').addClass('hide');
	  	   $('#bt_hold_order').show();

        $('#bt_checkout').css('width','66%'); 
	  }
	 	  
  }




function showhideToggle(){
    
    var objs=getClassNames("box-logout","div");
  
    objs[0].style.display="block";
  document.getElementById("settings_area").style.display="none";
  
  
  
}

function hideBoxLogout(){
    
    var objs=getClassNames("box-logout","div");
  
    objs[0].style.display="none";
}
     //hjl  切换属相值显示
     function showProductOptions(id ,name,obj){
      
       var objs1=$("li[class$='_options_label option_active']");
      //var objs1=getClassNames("420_options_label option_active","li");
           
        for(var j=0;j<objs1.length;j++){
           var classVal2=objs1[j].getAttribute("class");
           classVal2 = classVal2.replace("option_active","");
           objs1[j].setAttribute("class",classVal2);

       
     }

      var id2=id+"_"+name;
    
      var classVal3=document.getElementById(id2).getAttribute("class");
    
      classVal3 = classVal3.concat(" option_active");
       document.getElementById(id2).setAttribute("class",classVal3 );
   
   
     
       var cid= id+"_"+name+"_values";
     
       var className=id+"_option_values";
       var objs=getClassNames(className,"ul");
     
     for(var i=0;i<objs.length;i++){
        var classVal=objs[i].getAttribute("class");
      
        /*if(!/hide/.test(classVal)){
              classVal = classVal.concat(" hide");
              objs[i].setAttribute("class",classVal );
      
      }*/
     }
    
       var classVal1=document.getElementById(cid).getAttribute("class");
       classVal1 = classVal1.replace("hide","");
       document.getElementById(cid).setAttribute("class",classVal1 );
    

     //hjl  用jQuery 重写



    /* var parent=$(obj).parent().parent().parent().parent();
     var siblings=parent.siblings();
     var id=id+"_"+name+"_values";
     alert(id);*/
    
    
   }

   
   


  //miracle 订单菜单页面中的email  按钮
  function send_order_email(){
    $('.send-email').toggleClass("hide");
    if($('.send_email').attr("class")!='send-email hide'){
        document.getElementById("pos_order_container_sendemail_overlay").style.display="block"; 
        $('#pos_order_container_sendemail_overlay').attr("class","loader_overlay_section");
    }
  }
	
	


 function getClassNames(classStr,tagName){ 
          if (document.getElementsByClassName) { 
            return document.getElementsByClassName(classStr) 
            }else { 
            var nodes = document.getElementsByTagName(tagName),ret = []; 
            for(i = 0; i < nodes.length; i++) { 
            if(hasClass(nodes[i],classStr)){ 
            ret.push(nodes[i]) 
            } 
            } 
            return ret; 
            } 
          } 
   
    
    
    
</script>





</head>
<body class=" webpos-index-index">
    <!--分类树 start-->
    
<div id="menu2" class="mm-menu mm-offcanvas">
   <div class="mm-panels">
       <div class="mm-panel mm-hasnavbar mm-opened mm-current" id="mm-1">
			<ul class="multi-level mm-listview" role="menu" id="categories_list">
					<li role="presentation" class="parentMenu catitem" catid="0">
						<a tabindex="-1" href="index.php" >全部分类</a>
					</li> 
			
			
			
					<ul class="mm-listview">
    				<li>
              <span style="cursor:pointer;" tabindex="-1"  catid="-1" onclick="recently_add(1);" >最近添加</span>
            </li>
            <li>
              <span style="cursor:pointer;" tabindex="-1"  catid="{$cat.fid}" onclick="recently_add(2);" >经常购买</span>
            </li>
						<!--{foreach from=$categories item=cat}-->
							<li>
								<a class="mm-next" href="#sub_cat_{$cat.fid}" data-target="#sub_cat_{$cat.fid}"></a>
								<span style="cursor:pointer;" tabindex="-1"  catid="{$cat.fid}" onclick="checkcat({$cat.id},this)" >{$cat.name|escape:html}</span>
							</li>
						<!--{/foreach}-->	
					</ul>

			</ul>
      </div>


	<!--{foreach from=$categories item=cat}-->
		<div class="mm-panel mm-hasnavbar mm-hidden" id="sub_cat_{$cat.fid}">
		<div class="mm-navbar">
			<a class="mm-btn mm-prev" href="#mm-1" data-target="#mm-1"></a>
			<a class="mm-title" href="#mm-1">{$cat.name|escape:html}</a>
		</div>


		<ul catid="{$cat.fid}" class="mm-listview">
		
		
			<li>
			   
								<span style="cursor:pointer;" tabindex="-1"  catid="{$cat.fid}" onclick="checkcat({$cat.id},this)" >{$cat.name|escape:html}</span>
			</li>
		
		
			<!--{foreach from=$cat.cat_id item=child}-->
			<li>
			
			  <!-- <a catid="10" tabindex="-1" href="#">{$child.name|escape:html}</a> -->
			  <span style="cursor:pointer;" tabindex="-1"  catid="{$child.id}" onclick="checkcat({$child.id},this)" >{$child.name|escape:html}</span>
			  
			</li>
			<!--{/foreach}-->
			
		
		</ul>
																																								</div>
	<!--{/foreach}-->																																							
	<!-- dwh分类搜索 -->
		<script>
		  
				function checkcat(cid,obj){
								
													
					$.ajax({ 
					
						url: "index.php?act=catgoods",
						cache:false,
						data: {'cid':cid}, 
						dataType: 'json', 
						type: 'post', 
						
						  beforeSend:function(){
             
							   $('#ajaxload').show();
							   $("#ajaxload").append('<img src="templates/images/ajax-loader2.gif"  style=" position: fixed;top: 50%;left:50%;z-index:100; opacity: 1;"/>');
							},
							
						success: function(data){
						
								$('#ajaxload').hide();
							    $("#ajaxload img").remove();
						
								document.getElementById('product_content').innerHTML = data.content;
								
								document.getElementById('catid').innerHTML = data.cid;
								
								
								$("#menu2").hide();
								
								$('#category_dropdown div a span:eq(1)').text($(obj).text());
								$("#webpos_overlay").hide();
						}
					});
				
				}
																	  
		</script>			
																																

</div>

</div>
    
  <!--分类树 end-->  
    
<!--<div class="box-demo" id="box-demo">&nbsp;</div>-->
<div id="mm-0" class="mm-page mm-slideout">
<div class="demoheader" id="demoheader">
    <div class="demoheader-wrap">
          
            <a class="ms-logo col-1" href="http://www.magestore.com/" title="Magestore.com"><img src="./templates/images/magestore-logo.png"></a>
            <div class="col-2">
				<h2>Web POS v.2.0</h2>
				<!--<p>All data on this website will be reset on 2015-07-10</p>-->
				<!--<p id="countdown-reset"></p>-->
				
				<script type="text/javascript">/* Code removed by ScrapBook */</script>
			</div>
            <div class="right col-3">
                <p>
				                    <a class="product-link" target="_blank" href="http://demo.magestore.com/webpos/index.php/admin/" title="Back-end Demo">Back-end Demo</a>
                					<a class="backend-link" target="_blank" href="http://www.magestore.com/magento-pos-integration-extension.html/" title="Buy Now">Buy Now</a> 
                </p>
                <a class="close-demo" title="Close Demo header" onclick="hideheader();" href="javascript:void(0);" >
                &nbsp;
                </a>
            </div>
          
    </div>
</div>

<div id="demoheader-off" class="demoheader-off">
    <div class="box-close">
		<a class="close-demo" title="Show Demo header"  onclick="showheader();">&nbsp;</a>
	</div>
</div>


<div class="wrapper">
        <noscript>
        <div class="global-site-notice noscript">
            <div class="notice-inner">
                <p>
                    <strong>JavaScript seems to be disabled in your browser.</strong><br />
                    You must have JavaScript enabled in your browser to utilize the functionality of this website.                </p>
            </div>
        </div>
    </noscript>
    <div class="global-site-notice demo-notice">
        <div class="notice-inner"><p>This is a demo store. Any orders placed through this store will not be honored or fulfilled.</p></div>
    </div>
    <div class="page">
                <div class="col1-layout">
            <div class="main">
                                <div class="col-main">
                                        
<script type="text/javascript">/* Code removed by ScrapBook */</script>


<!-- end model link --><style type="text/css">
/* Code tidied up by ScrapBook */
#popup-customer ul { overflow-x: hidden ! important; overflow-y: auto ! important; }
.ui-widget-header, .footer #cancel-sale-btn button:hover, .discount-webpos .discount-type button.btn2, .discount-webpos .choose-discount .btn2, .custom_price_tab .discount-type .btn2, .discount-webpos .top-title, #edit_cart_item_popup .product_tab .common .choose, .custom_price_tab .custom-price button, #bt_remove_tax, #count_cash_area button, #current_balance_line, .webpos_popup_area .top_content .popup_title, #holded_orders_section .content .item .bt_reload_order, #holded_orders_section .content .item .bt_delete_holded_order, #bt_hold_order, #reports_area button, #cashdrawer_area button, #reports_area .top-content .title-page, #cashdrawer_area .top-content .title-page, #holded_orders_detail .top-content .title-page, #holded_orders_section .top-content .title-page, #pending_orders_popup .panel-heading, #order-success button.new-order, #orders_area #orderlist-search-form, #create-customer .modal-content .top-create, #shipping-address .modal-content .top-create, #popup-customer button, .product_list .product .product_options ul .product-name h2, .btn-warning, #order_info .checkout_buttons_area button.btn-warning, #shipping_area #edit_shipping_address, #settings_area .top-content, #orders_area .order-detail .send-email .top-form, #orders_area .order-detail .refund .top-form, #orders_area .form-search, #orders_area .order-detail .top-order .head-view-order, .top_bar.left, #pos_container #main_container .col_right .top_bar, #bt_checkout { background: rgb(255, 165, 0) none repeat scroll 0% 0% ! important; border-color: rgb(255, 165, 0) ! important; }
#current_balance_line .balance_wrapper .current_balance_fake { color: rgb(255, 165, 0) ! important; }
#total_wp strong { line-height: 50px; padding-left: 0px; }
#total_wp #grand_total_wp_show_hide strong { line-height: initial; padding-left: initial; }
</style>
<style type="text/css" id="css_from_js">
/* Code tidied up by ScrapBook */
</style>
<script type="text/javascript">/* Code removed by ScrapBook */</script>

<div class="webpos_overlay" id="webpos_number_board_overlay" style="display: none;"></div>
<div id="webpos_number_board" class="form-group webpos_number_board" currentinput="webpos_number_board_default_input" style="left: 50%; top: 150vh;">
    <ul>
        <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
            <button type="button" class="btn btn-default numberInput" value="1">1</button>
        </li>
        <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
            <button type="button" class="btn btn-default numberInput" value="2">2</button>
        </li>
        <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
            <button type="button" class="btn btn-default numberInput" value="3">3</button>
        </li>
    </ul>        
    <ul>
        <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
            <button type="button" class="btn btn-default numberInput" value="4">4</button>
        </li>
        <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
            <button type="button" class="btn btn-default numberInput" value="5">5</button>
        </li>
        <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
            <button type="button" class="btn btn-default numberInput" value="6">6</button>
        </li>
    </ul>
    <ul>
        <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
            <button type="button" class="btn btn-default numberInput" value="7">7</button>
        </li>
        <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
            <button type="button" class="btn btn-default numberInput" value="8">8</button>
        </li>
        <li class="col-lg-4 col-md-4  col-sm-4 col-xs-4">
            <button type="button" class="btn btn-default numberInput" value="9">9</button>
        </li>
    </ul>
    <ul>
        <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
            <button type="button" class="btn btn-default numberInput decimalSymbol" value=".">.</button>
        </li>
        <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
            <button type="button" class="btn btn-default numberInput" value="0">0</button>
        </li>
        <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
            <button type="button" class="btn btn-default numberInput" value="00">00</button>
        </li>        
    </ul>
    <ul>
        <li class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <button type="button" class="btn btn-default clear-number"></button>
        </li>  
    </ul>
</div>
<input id="webpos_number_board_default_input" style="background: rgb(255, 255, 255) none repeat scroll 0% 0%;" type="hidden">
<script type="text/javascript">/* Code removed by ScrapBook */</script>

<div id="splitship_area" class="webpos_popup_area" style="display: none; width: 80vw; margin-top: 7vh; position: fixed; z-index: 99; margin-left: -40vw; left: 50%; top: 100vh;">
    <div class="webpos_popup_loader" style="display: none;">
        <div class="img-ajax"></div>
    </div>
    <div class="top_content">
        <div class="popup_title">
            <h2>Items to Ship</h2>
        </div>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
    <div class="popup_content" style="max-height: 70vh; min-height: 40px; overflow: auto;">

    </div>
    <div class="bottom_buttons">
        <div class="track_number_form col-lg-10 col-md-10 col-sm-10 col-xs-10"><label class="col-lg-5 col-md-5 col-sm-5 col-xs-5">Track Number</label><input class="col-lg-5 col-md-5 col-sm-5 col-xs-5" id="track_number"></div>
        <button type="button" class="btn btn-default btn-back">Cancel</button>
        <button type="button" class="btn btn-default btn-next">Done</button>
    </div>
</div>
<script type="text/javascript">/* Code removed by ScrapBook */</script><script type="text/javascript">/* Code removed by ScrapBook */</script><script type="text/javascript">/* Code removed by ScrapBook */</script>

<div id="offline_receipt_template" class="hide">
    
<style>
/* Code tidied up by ScrapBook */
@media (max-width: 480px) {
  .items-view table .row-total { display: none; }
}
@media (max-width: 380px) {
  .items-view table .item-name { max-width: 120px; }
  .items-view table .price-container, .items-view table .tax { display: none ! important; }
  .items-view table .row-total { display: table-cell ! important; }
}
* { box-sizing: border-box; }
html { font-size: 13px; }
body, h1, h2, h3, h4, h5, h6, ul { padding: 0px; margin: 0px; font-weight: normal; }
table { border-spacing: 0px; }
ul { list-style: outside none none; }
.paper { margin: 0px; padding: 5px 0px; }
.logo-container, .store-info, .print-footer { text-align: center; }
.items-view { padding: 3px 0px; margin-bottom: 7px; }
.items-view table { width: 100%; text-align: right; font-size: inherit; font-weight: inherit; border-collapse: separate; }
.items-view table thead { vertical-align: top; }
.items-view table tbody { vertical-align: top; }
.items-view table td, .items-view table th { border-left: 10px solid transparent; }
.items-view table td:first-child, .items-view table th:first-child { border-left: medium none; }
.items-view table .item-name { overflow: hidden; white-space: normal; text-transform: capitalize; }
.total-zone { margin-bottom: 7px; text-transform: uppercase; }
.total-zone table { font-weight: inherit; font-size: inherit; width: 100%; }
.shipping_area, .shipping_area address { text-transform: uppercase; font-style: normal; }
.footer { text-align: center; }
.date { text-align: right; }
#store-name { text-transform: uppercase; font-weight: bold; font-size: 30px; }
#store-star { text-transform: uppercase; font-weight: 400; font-size: 16px; }
#store-info { font-weight: 200; font-size: 16px; }
@media screen {
  .paper { margin: 5px auto; max-width: 600px; }
}
@media print {
  body { color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); }
}
@page { margin: 2mm 4mm; }
#print_layout .logo-container img { max-width: 100%; }
</style>
<!--Header-->
<div class="paper fluid-container">

    <div id="print_layout">
                <div class="logo-container container">
                            <img src="./templates/images/logo.png" title="Webpos Receipt Logo" alt="Webpos Receipt Logo">
                        <div id="store-name">INVOICE</div>
            <div id="store-star">**** ****</div>
                            <div id="store-info">Store 123<br>Phone: 3232-3232-12</div> 
                        <div class="header-text"></div> 
            <div class="info-invoice">
                <br><span><span id="offline_receipt_order_number"></span>&nbsp;<br><b id="offline_receipt_order_date"></b></span>
            </div>
                            <div class="user-info">
                    <p style="text-transform: uppercase; margin-bottom: 0px;">CASHIER: <span id="offline_receipt_cashier_name"></span></p>
                </div>
                        <div class="user-info">
                <p style="text-transform: uppercase; margin-top: 0px; margin-bottom: 0px;">CUSTOMER: <span id="offline_receipt_customer_name"></span></p>
            </div>
        </div>

        <div class="shipping_area">
                            <span>SHIPPING : <b id="offline_receipt_shipping_method"></b></span> <br>
                                        <span>PAYMENT :<b id="offline_receipt_payment_method"></b></span>
                    </div>
        <div class="items-view-container container">
            <div class="items-view">
                <table>
                    <thead>
                        <tr>
                            <th class="item-name" data-metadata="item-name" align="left">ITEM</th>
                            <th data-metadata="qty">Qty</th>
                            <th class="price-container" data-metadata="price">PRICE</th>
                            <th class="tax" data-metadata="tax-amount">TAX</th>
                            <th class="row-total" data-metadata="row-total" align="right">SUBTOTAL</th>
                        </tr>
                    </thead>
                    <tbody id="offline_receipt_items">
                    </tbody>
                </table>
            </div>
        </div>
        <div class="total-zone-container container">
            <div class="total-zone">
                <table>
                    <tbody>
                        <tr>
                            <td>Subtotal</td>
                            <td align="right"><strong id="offline_receipt_subtotal"></strong></td>
                        </tr>
                        <tr>
                            <td>Taxes</td>
                            <td align="right"><strong id="offline_receipt_tax"></strong></td>
                        </tr>
                        <tr>
                            <td>Shipping</td>
                            <td align="right"><strong id="offline_receipt_shipping"></strong></td>
                        </tr>
                        <tr>
                            <td style="padding-bottom: 5px;">Total</td>
                            <td align="right"><strong id="offline_receipt_grandtotal"></strong></td>
                        </tr>
                        <tr>
                            <td style="border-top: 1px dashed rgb(0, 0, 0); padding: 2px 0px;"></td>
                            <td style="border-top: 1px dashed rgb(0, 0, 0); padding: 2px 0px;"></td>
                        </tr>
                        <tr id="offline_receipt_row_cashforpos">
                            <td>Cash In( For Web POS only)</td>
                            <td align="right"><strong id="offline_receipt_cashforpos"></strong></td>
                        </tr>
                        <tr id="offline_receipt_row_change">
                            <td>POS Change</td>
                            <td align="right"><strong id="offline_receipt_change"></strong></td>
                        </tr>
                        <tr id="offline_receipt_row_ccforpos">
                            <td>Credit Card ( For Web POS only)</td>
                            <td align="right"><strong id="offline_receipt_ccforpos"></strong></td>
                        </tr>
                        <tr id="offline_receipt_row_cp1forpos">
                            <td>Custom payment 1</td>
                            <td align="right"><strong id="offline_receipt_cp1forpos"></strong></td>
                        </tr>
                        <tr id="offline_receipt_row_cp2forpos">
                            <td>Custom payment 2</td>
                            <td align="right"><strong id="offline_receipt_cp2forpos"></strong></td>
                        </tr>
                        <tr id="offline_receipt_row_codforpos">
                            <td>Cash On Delivery</td>
                            <td align="right"><strong id="offline_receipt_codforpos"></strong></td>
                        </tr>
                        <tr id="offline_receipt_row_balance">
                            <td>Balance</td>
                            <td align="right"><strong id="offline_receipt_balance"></strong></td>
                        </tr>
                    </tbody>
                </table>
            </div>

        </div>
                    <div id="offline_receipt_comment">
            </div>
                    <div class="print-footer" id="store-star">-------- **** --------</div>
        <div class="print-footer"> Thank you for shopping at our store.We hope you enjoy your purchase and look forward to serving you again. </div>
    </div>
</div>

</div>
  <!--登录表单 start-->
{if $yh > 0}

{else}
<div id="login-webpos" class="modal hide">
     <div class="modal-dialog">
         <div class="modal-content">
			 <img id="login_loader" class="hide" src="./templates/images/ajax-loader2.gif">
         
             <div class="login-webpos">
                 <form id="webpos_login" class="form-login">
                     <div class="logo form-group"><img class="img-responsive center-block" src="./templates/images/logo.png"></div>                     
                     <div class="form-group">
                         <input id="login_username" value="" name="username" placeholder="用户名" class="input-text required-entry form-control validation-passed" type="text">
                         <input id="login_password" value="" name="password" placeholder="密码" class="input-text required-entry validate-password form-control validation-passed" type="password">
                     </div>
					 
                     <div class="form-group">
                         <button type="button" class="btn btn-warning validation-passed" onclick="loginWebpos()" title="Login" name="">登录</button>
                     </div>
                 </form>
             </div>
           
          
          <script>
		  
				function loginWebpos(){
				
					var username = $("#login_username").val();
					var password = $("#login_password").val();
				
					$.ajax({ 
					
						url: "index.php?act=login",
						cache:false,
						data: {'username':username,'password':password}, 
						dataType: 'json', 
						type: 'post', 
						success: function(data){
						
							
							
							if(data.id == 1){	

							
							var ss = data.user_name.substring(0, 1);
							
							
							
							
							$('#login-webpos').toggleClass('hide');
							$('#login_overlay').toggleClass('hide');
							$('#yonghu').text(data.user_name); 
							
							$('#short_name').text(ss); 
							
							document.getElementById('content_account').innerHTML = data.content; 
							$('#change_profile').on('click',function(){change_profile()});
																					
							msg('success','登录成功');
							//window.location.reload();

							
							}
							if(data.id == 2){
							
							msg('danger','用户名或密码错误');
								//$("#tishi").show();
							
							}
						}
					});
				
				}
          </script>
          
         </div>
     </div>
 </div>
 
  <!--登录表单 end-->
   
   
   
 <div class="fade-login hide" id="login_overlay"></div>
 
{/if}
  
 <script type="text/javascript">/* Code removed by ScrapBook */</script>

 <div id="webpos_popups"><div id="webpos_popups">
        <div class="webpos_overlay dark_overlay" id="webpos_dark_overlay" style="display: none;" onclick="overlayClicked()"></div>
		
    <div class="webpos_overlay" id="webpos_overlay" style="display: none;" onclick="overlayClicked();"></div>
    <div id="edit_cart_item_popup" class=" col-lg-3 col-md-3 col-sm-3 col-xs-3" style="opacity:0;">
     
    </div>
    <div class="bg-loading-ajax" id="bg_ajax_loader">
        <div class="img-ajax"></div>
    </div>
    <div id="hiddenArea" class="hide">
        <div id="hiddenContainer" class="hide">
        </div>
        <input id="upload_file_path" value="" type="hidden">
    </div>
    <div class="popup-customer col-lg-4 col-md-4 col-sm-4 col-xs-4" id="popup-customer">
        <div class="popup-content">
            <div class="btn-create-customer">
                <button id="btn-create" type="button" class="btn btn-warning" onclick="showAddCustomer()">
                添加用户
                </button>
            </div>
            <form id="customer_search_form" action="" method="">
                <div class="search">
                    <input class="input-text form-control" placeholder="Search" id="search_customer" type="text" onblur="searchlist()">
                </div>
            </form>
            <div id="customer_search_autocomplete_message"></div>
            <div id="customer_search_autocomplete" class="autocomplete">
                <ul id="customer_list">
				
					
				
               </ul>
            </div>

        </div>
    </div>

            <div class="discount-webpos" id="discount-webpos">
            <div class="modal-content">

                <div class="top-title col-lg-12 col-md-12 col-sm-12 col-xs-12">
                 <button style="display: none;" id="btn-cancel" class="btn btn-left col-lg-3 col-md-3 col-sm-3 col-xs-3" type="button" onclick="removeAllDiscount()">取消</button>
                    <button style="display: none;" id="btn-cancel" class="btn btn-left col-lg-3 col-md-3 col-sm-3 col-xs-3" type="button">Cancel</button>
                    <h2 class="title col-lg-6 col-md-6 col-sm-6 col-xs-6">优惠</h2>
                    <button id="btn-apply" class="btn btn-right col-lg-3 col-md-3 col-sm-3 col-xs-3" type="button">添加</button>
                </div>
                                    <div class="choose-discount col-lg-12 col-md-12 col-sm-12 col-xs-12">
                        <button type="button" class="btn btn2 col-lg-6 col-md-6 col-sm-6 col-xs-6 " id="custome-discount">店铺优惠</button>

                        <button type="button" class="btn btn1 col-lg-6 col-md-6 col-sm-6 col-xs-6 " id="coupon-discount">优惠券</button>
                    </div>
                                <div class="form-coupon " style="display: none;">
                    <div class="form-group">
                        <div class="amount col-lg-3 col-md-3 col-sm-3 col-xs-3"></div>
                        <div class=" col-lg-9 col-md-9 col-sm-9 col-xs-9">
						<!-- 红包 -->
						<input value="" id="apply_discount_coupon_code" placeholder="请输入优惠券号" class="form-control" type="text">
						</div>
                    </div>                                      

                </div>
                <form class="form forms-discount active col-lg-12 col-md-12 ">
                    <div class="form-group">
                        <div class="name col col-lg-4 col-md-4 col-sm-4 col-xs-4">优惠名称</div>
                        <div class=" col-lg-8 col-md-8 col-sm-8 col-xs-8"><input id="discount_name" value="" placeholder="请输入优惠名称" class="input-text form-control" type="text"></div>
                    </div>
                    <div class="form-group discount-type">
                        <div class="shippble col col-lg-6 col-md-6 col-sm-6 col-xs-6">优惠类型</div>
                        <div class=" col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <button type="button" class="btn btn1" id="btn-percentx">%</button>
                            <button type="button" class="btn btn2" id="btn-dollorx">$</button>
                        </div>
                    </div>
                    <div class="form-group input-amount">
                        <div class="amount col col-lg-3 col-md-3 col-sm-3 col-xs-3">优惠金额</div>
                        <div class=" col-lg-9 col-md-9 col-sm-9 col-xs-9"><input value="" id="txtScream1" placeholder="0.00" class="input-text form-control" type="text">
                            <input value="$0.00" id="current_discount" type="hidden">
                        </div>
                    </div>



                    <div class="form-discount">
                        <ul>
                            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <button type="button" class="btn btn-default" value="1" onclick="connectionDigital1(this);">1</button>
                            </li>
                            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <button type="button" class="btn btn-default" value="2" onclick="connectionDigital1(this);">2</button>
                            </li>
                            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <button type="button" class="btn btn-default" value="3" onclick="connectionDigital1(this);">3</button>
                            </li>
                        </ul>
                        <ul>
                            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <button type="button" class="btn btn-default" value="4" onclick="connectionDigital1(this);">4</button>
                            </li>
                            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <button type="button" class="btn btn-default" value="5" onclick="connectionDigital1(this);">5</button>
                            </li>
                            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <button type="button" class="btn btn-default" value="6" onclick="connectionDigital1(this);">6</button>
                            </li>
                        </ul>
                        <ul>
                            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <button type="button" class="btn btn-default" value="7" onclick="connectionDigital1(this);">7</button>
                            </li>
                            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <button type="button" class="btn btn-default" value="8" onclick="connectionDigital1(this);">8</button>
                            </li>
                            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <button type="button" class="btn btn-default" value="9" onclick="connectionDigital1(this);">9</button>
                            </li>
                        </ul>
                        <ul>
                            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <button type="button" class="btn btn-default clear-number" id="delete_apply_discount_wp" onclick="backspace1();"></button>
                            </li>
                            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <button type="button" class="btn btn-default" value="0" onclick="connectionDigital1(this);">0</button>
                            </li>
                            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <button type="button" class="btn btn-default" value="00" onclick="connectionDigital1(this);">00</button>
                            </li>
                        </ul>
                    </div>





                </form>
            </div>
        </div>
        
            

    <div id="pending_orders_popup" style="display: none;">
        <div id="pending_orders_loader">
            <div class="img-ajax"></div>
        </div>
        <div class="pospanel">
            <div class="panel-heading"><h2 class="col-sm-9">Offline Orders</h2><button class="btn btn-save">Sync Order(s)</button>
            </div>

            <div class="panel-body">
                <table class="table data order-tables table-responsive" cellspacing="0">
                    <colgroup>
                        <col width="1">
                        <col width="1">
                        <col width="1">
                        <col width="1">
                        <col width="1">
                    </colgroup><thead>
                        <tr class="theadings">
                            <th><input id="cb_all" value="" type="checkbox"></th>
                            <th>Customer Email</th>
                            <th>Grand total</th>
                            <th class="a-center">Cash in</th>
                            <th class="last"></th>
                        </tr>
                    </thead>
                    <tbody class="even" id="pending_orders_content">

                    </tbody>
                </table>

            </div>
        </div>
    </div>
    <!--div id='pending_orders_content' class="hide">          
            <div class='payment_shipping'>
                    <div class='shipping_method col-lg-6 col-md-6 col-sm-6 col-xs-6'>shipping_method</div>
                    <div class='payment_method col-lg-6 col-md-6 col-sm-6 col-xs-6'>payment_method</div>
            </div>
            <div class='detail_data'>
                    <div class="name-product col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <div class='product_name'>abdfgt</div>
                            <div class='product_options'>rwer,gfyfy</div>
                    </div>
                    <div class="product-qty col-lg-1 col-md-1 col-sm-1 col-xs-1">
    0                    </div>
                    <div class="price col-lg-4 col-md-4 col-sm-4 col-xs-4">
                            <span class='webpos_item_subtotal row_total'>0</span>
                    </div>
                    <div class='clear'></div>
            </div>
    </div-->


    


    <!-- Hold orders -->
        <div id="holded_orders_section" class="col-lg-7 col-md-7 col-sm-7 col-xs-7 col_left setting-right" style="left: 99px; top: 0px; z-index: 12;  display: none;" >


        <div id="holded_orders_section_loader" style="display: none;">
            <div class="img-ajax"></div>
        </div>
        <div class="top-content">
            <div class="title-page col-lg-12 col-md-12 col-sm-12 col-xs-12 title-general">
                <h2>持有订单</h2>
            </div>
        </div>
        <div class="content" id="holded_orders_list_grid">
            <div class="table-responsive" id="holded_order_grid">
                    <div class="form-row">
                                    <div class="create-at">
                        <div class="date col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            {$crt_date}</div>
						<div class="clear"></div>
                    </div>


          <div class="holded_item_wrapper" id = "holding_item_yj">
          <!-- {foreach from=$on_hold_order item=order} -->
          <div invoiceid="null" cancancel="false" created_at="April 24, 2013" grand_total="$724.62" status="holded" show_label="" status_label="On Hold" id="orderlist_row_95" class="info type5 col-lg-12 col-md-12 col-sm-12 col-xs-12" onclick="previewHoldedOrder({$order.add_time});">
          <ul class="line1">
              <li class="order-id col-lg-6 col-md-6 col-sm-6 col-xs-6">无订单编号</li>
              <li class="price col-lg-6 col-md-6 col-sm-6 col-xs-6">&yen;{$order.price}</li>
            </ul>
            <ul>
              <li class="order-id col-lg-6 col-md-6 col-sm-6 col-xs-6">自定义客户</li>
              <li class="price col-lg-6 col-md-6 col-sm-6 col-xs-6">{$order.time}</li>
            </ul>
            <ul class="building-address">
              <li class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                {$order.goods_sns}              </li>
              <li class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                 {$order.note}             </li>
            </ul>
            </div>
            <div class="clear"></div>
          <div class="button_wrapper" onmouseover="addTempClass($('orderlist_row_95'),'tempactive')" onmouseout="removeTempClass($('orderlist_row_95'),'tempactive')">
          <button type="button" class="btn btn-warning bt_reload_order_online" onclick="reloadOrderByOrderId({$order.add_time});" style="">放回购物车</button>
            <button type="button" class="btn btn-warning bt_cancel_order_online" onclick="deleteHoldedOrderByOrderId({$order.add_time},this);" style="">删除</button>
            <div class="clear"></div>   
          </div>      
          <!-- {/foreach} -->     
			   </div>


            </div>
                <input type="text" id="current_holded_page_number" style="display: none;"> <!-- Mr.Jack current page -->
    </div>
        </div>
    </div>
    <div id="holded_orders_detail" class="col_left setting-right">
        <div id="holded_orders_detail_loader" class="webpos_popup_loader" style="display: none;">
            <div class="img-ajax"></div>
        </div>
        <div class="top-content">
            <div class="title-page col-lg-12 col-md-12 col-sm-12 col-xs-12 popup_title">
                <h2>Order <span class="order_id"></span></h2>
            </div>
        </div>
        <div class="clear"></div>
        <div class="content" id="holded_orders_detail_content">
         <input type="hidden" name="order_view_id" id="order_view_id" value="444">
<div class="view-order">
    <div id="order-messages">
        
    </div>
            <div class="note-top"><p>Served by demo</p></div>
    <div class="sold-to col col-lg-6 col-md-6 col-ms-6 col-xs-6">
        <p class="title">Billing Address:</p>
        <div class="content">Guest POS<br>

Street<br>



Guest City,  California, 90034<br>
États-Unis<br>
T: 12345678

</div>
    </div>
            <div class="ship-to col col-lg-6 col-md-6 col-ms-6 col-xs-6">
            <p class="title">Shipping Address:</p>
            <div class="content">Guest POS<br>

Street<br>



Guest City,  California, 90034<br>
États-Unis<br>
T: 12345678

</div>
        </div>
        <div class="payment-method col col-lg-6 col-md-6 col-ms-6 col-xs-6">
        <p class="title">Méthode de paiement</p>
        <div class="content">
                        <!--p><strong>Multiple Payments</strong></p-->
            <div class="address">La commande a été passée en utilisant USD</div>
                    </div>
    </div>
            <div class="payment-method col col-lg-6 col-md-6 col-ms-6 col-xs-6">
            <p class="title">Méthode d'expédition</p>
            <div class="address content">
                                    Webpos Pickup                
                                            </div>
        </div>
                <div class="clear"></div>
        <ul class="hide" id="webpos_edit_payment_methods_form">
                                <li class="col-lg-12 col-md-12 col-ms-12 col-xs-12"><span class="col-lg-6 col-md-6 col-ms-6 col-xs-6">Cash In( For Web POS only)</span> <input onclick="splitPaymentFocus(this)" onchange="calculateEditSplitPayment(this)" type="text" title="Cash In( For Web POS only)" class="col-lg-4 col-md-4 col-ms-4 col-xs-4 edit_payment_method_inputs" id="cashforpos_ref_no_edit" method_code="cashforpos" value=""></li>
                                        <li class="col-lg-12 col-md-12 col-ms-12 col-xs-12"><span class="col-lg-6 col-md-6 col-ms-6 col-xs-6">Credit Card ( For Web POS only)</span> <input onclick="splitPaymentFocus(this)" onchange="calculateEditSplitPayment(this)" type="text" title="Credit Card ( For Web POS only)" class="col-lg-4 col-md-4 col-ms-4 col-xs-4 edit_payment_method_inputs" id="ccforpos_ref_no_edit" method_code="ccforpos" value=""></li>
                                        <li class="col-lg-12 col-md-12 col-ms-12 col-xs-12"><span class="col-lg-6 col-md-6 col-ms-6 col-xs-6">Cash On Delivery</span> <input onclick="splitPaymentFocus(this)" onchange="calculateEditSplitPayment(this)" type="text" title="Cash On Delivery" class="col-lg-4 col-md-4 col-ms-4 col-xs-4 edit_payment_method_inputs" id="codforpos_ref_no_edit" method_code="codforpos" value=""></li>
                                        <li class="col-lg-12 col-md-12 col-ms-12 col-xs-12"><span class="col-lg-6 col-md-6 col-ms-6 col-xs-6">Custom payment 1</span> <input onclick="splitPaymentFocus(this)" onchange="calculateEditSplitPayment(this)" type="text" title="Custom payment 1" class="col-lg-4 col-md-4 col-ms-4 col-xs-4 edit_payment_method_inputs" id="cp1forpos_ref_no_edit" method_code="cp1forpos" value=""></li>
                                        <li class="col-lg-12 col-md-12 col-ms-12 col-xs-12"><span class="col-lg-6 col-md-6 col-ms-6 col-xs-6">Custom payment 2</span> <input onclick="splitPaymentFocus(this)" onchange="calculateEditSplitPayment(this)" type="text" title="Custom payment 2" class="col-lg-4 col-md-4 col-ms-4 col-xs-4 edit_payment_method_inputs" id="cp2forpos_ref_no_edit" method_code="cp2forpos" value=""></li>
                                <li class="col-lg-12 col-md-12 col-ms-12 col-xs-12">
                <span class="col-lg-6 col-md-6 col-ms-6 col-xs-6" id="take_payment_total_remain_label" remainlabel="Remain money" changelabel="Expected Change">Remain money</span>
                <span class="col-lg-6 col-md-6 col-ms-6 col-xs-6" id="take_payment_total_remain" style="text-align:left;padding-left:0px;">0</span>
            </li>
            <div class="hide" id="take_payment_total_due">0</div>
            <div class="clear"></div>
        </ul>
    </div>
<div class="product">
    <!-- View Items-->
    <div class="grid np col col-lg-12 col-md-12 col-ms-12 col-xs-12">
        <div class="hor-scroll table-responsive">
            <table cellspacing="0" class="table data order-tables">
                <colgroup><col>
                <col width="1">
                <col width="1">
                <col width="1">
                <col width="1">
                </colgroup><thead>
                    <tr class="theadings">
                        <th>Produit</th>
                        <th>Prix d'origine</th>
                        <th>Prix</th>
                        <th class="a-center">Qté</th>
                        <th class="last"><span class="nobr">Sous-total</span></th>
                    </tr>
                </thead>
                                                                                                                                                                                                                    <tbody class="even">
                        <tr class="fist even">
                            <td>Geometric Candle Holders                                <div class="product_options">
                                                                      </div>
                            </td>
                            <td><span class="price">90,00&nbsp;$US</span></td>
                            <td>82,57&nbsp;$US</td>
                            <td>1</td>
                            <td>82,57&nbsp;$US</td>
                        </tr>
                    </tbody>
                                                                                                                                                                                    <tbody class="odd">
                        <tr class=" last odd">
                            <td>Madison RX3400                                <div class="product_options">
                                                                      </div>
                            </td>
                            <td><span class="price">715,00&nbsp;$US</span></td>
                            <td>655,96&nbsp;$US</td>
                            <td>1</td>
                            <td>655,96&nbsp;$US</td>
                        </tr>
                    </tbody>
            </table>
        </div>
    </div>
</div>
<div class="entry-edit order-total col-lg-12 col-md-12 col-ms-12 col-xs-12">
    <div class="order-totals">
        
<table cellspacing="0" width="100%">
    <colgroup><col>
    <col width="1">
       
        </colgroup><tfoot>
                    <tr class="0">
            <td class="label">
                <strong>Total final</strong>
            </td>
            <td class="emph">
                <strong>799,46&nbsp;$US</strong>
            </td>
        </tr>
                            <tr class="1">
            <td class="label">
                <strong>Total payé</strong>
            </td>
            <td class="emph">
                <strong>0,00&nbsp;$US</strong>
            </td>
        </tr>
                            <tr class="2">
            <td class="label">
                <strong>Total remboursé</strong>
            </td>
            <td class="emph">
                <strong>0,00&nbsp;$US</strong>
            </td>
        </tr>
                            <tr class="3">
            <td class="label">
                <strong>Total dû</strong>
            </td>
            <td class="emph">
                <strong>799,46&nbsp;$US</strong>
            </td>
        </tr>
                </tfoot>
    
            <tbody>
                        
<tr>
    <td class="label">
        <div class="tax-collapse">
                    Taxe                </div>
    </td>
    <td>
        <span class="price">60,93&nbsp;$US</span>    </td>
</tr>                            <tr class="1">
            <td class="label">
                                Sous-total                            </td>

                        <td>
                799,46&nbsp;$US
                        </td>
        </tr>
                            <tr class="2">
            <td class="label">
                                Expédition et traitement                            </td>

                        <td>
                0,00&nbsp;$US
                        </td>
        </tr>
                </tbody>
    </table>
    </div>
</div>
<div class="history col-lg-12 col-md-12 col-ms-12 col-xs-12" id="order-comment-history">
    <p class="title">Comment History</p>

        <p>
            <span class="date">Commentaires:</span>
            <span class="status">cvx</span>
        </p>
          <p>
                <span class="date">2016-12-29 07:08:20</span>
                <span class="status">pending</span>
            </p>
            
</div>
        </div>
    </div>
	<!--评论 start-->
    <div id="before_hold_popup" class="hide">
        <div id="before_hold_popup_loader" class="webpos_popup_loader" style="display: none;">
            <div class="img-ajax"></div>
        </div>
		
        <div class="comment">
            <div class="title col col-lg-7 col-md-7 col-sm-7 col-xs-7">填写备注</div>
            <div class="col-lg-5 col-md-5 col-sm-5 col-xs-5" style="padding: 0px;"><button class="btn btn-warning" style="float: right; margin: 5px;" onclick="add_to_hold()">保存</button></div>                                            
            <textarea id="hold_order_descreption"></textarea>
            <div id="hold_order_descreption_hidden" class="hide"></div>
        </div> 
    </div>
    <!--评论 end-->
<script type="text/javascript">
	
</script>
    <!-- Tills -->
            <div id="till_area" class="webpos_popup_area" style="top: -100vh;">
            <div class="webpos_popup_loader" style="display: none;">
                <div class="img-ajax"></div>
            </div>
            <div class="top_content">
                <div class="popup_title">
                    <h2>Please select your cash drawer!</h2>
                </div>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
            <div class="popup_content">
                <ul>
                    <li class="till_item  only_one_cash_drawer " id="till_1" onclick="selectTill();">Cash Drawer Default
                    </li>                

                </ul>
            </div>
        </div>

        <input id="set_transac_flag" name="set_transac_flag" value="" type="hidden">
        <input id="transfer_val" name="transfer_val" value="" type="hidden">

        <div id="cashdrawer_area" class="col-lg-7 col-md-7 col-sm-7 col-xs-7 col_left setting-right" style=" display:none; width:770px;">
            <div id="cashdrawer_section_loader" class="webpos_popup_loader" style="display: none;">
                <div class="img-ajax"></div>
            </div>
            <div class="top-content">
                <div class="title-page col-lg-12 col-md-12 col-sm-12 col-xs-12 title-general">
                    <h2>钱箱管理</h2>
                </div>
            </div>
            <div class="clear"></div>
            <div class="content" id="cashdrawer_grid">
                <div id="manual_transfer">
                    <p class="label">其他交易:</p>

                    <p class="cash-amount">
                        <input id="transaction_amount" name="transaction_amount" placeholder="金额" value="" class="txt_amount" type="text" onfocus="transactionInputAmountOnfocus();">
                    </p>

                    <p class="cash-type">
                        <select size="1" name="transaction_type" id="transaction_type" class="control">
                            <option value="1">收入</option>
                            <option value="0">支出</option>
                        </select>
                    </p>
                    <p class="control">
                        <button type="button" value="Submit" id="transaction_submit" class="" onclick="update_cash_drawer()"><span>提交</span></button>
                    </p>
                    <div id="current_balance_line" style="width: 100px;">
                        <div class="balance_wrapper">
                            <div id="current_balance_loader" class="webpos_popup_loader" style="display: none;">
                                <div class="img-ajax"></div>
                            </div>
                            <div class="label">当前余额</div>
                            <span class="current_balance" id="crt_balance">{if $crt_balance}{$crt_balance}{else}0{/if}</span>
                            <span class="current_balance_fake"></span>
                        </div>
                    </div>

                    <div class="clear"></div>
                </div>
                <div class="clear"></div>

                <div style="clear: both; font-size: 11px;">
                    <span style="display: none; color: green;" id="transaction_saved"> </span>
                    <span style="display: none; color: red;" id="transaction_not_saved"> </span>
                </div>
                <div id="transaction_note_wapper" style="display: none;">
                    <textarea name="transaction_note" id="transaction_note" placeholder="备注"></textarea>
                    <a href="#clear" id="transaction_note_clear" onclick="transactionClearBox();">清除</a>
                </div>
                <div class="tran-list">
                    <div id="transaction_grid" style="max-height: 442px;">
                      
                      <table id="transaction_table" class="table-bordered webpos_bordered_table">
    <thead>
        <tr>
            <th>时间</th>
            <th>收入</th>
            <th>支出</th>
            <th>余额</th>
            <th>订单编号</th>
            <th>操作人</th>
            <th>位置</th>
            <th>备注</th>
        </tr>
    </thead>
    <tbody>
<!-- {foreach from=$cash_drawer item=item} -->
    <tr>
        <td>{$item.add_time}</td>
        <td>{$item.in_come}</td>
        <td>{$item.out_come}</td>
        <td>{$item.balance}</td>
        <td>{$item.order_id}</td>
        <td>{$item.cashier}</td>
        <td>{$item.location}</td>
        <td>{$item.note}</td>
    </tr>
    <!-- {/foreach} -->
                    </tbody>
</table>


                    </div>
                    <div class="bottom_control">
                        <button type="button" class=""  id="cdexport">
                            数据导出  
                         </button>
                        <div class="clear"></div>
                        <div id="transaction_export" class="collapse out">
                            <a title="Excel" href="idx.php?act=exprot_excel"><img src="./templates/images/xls.png"></a>
                            <a title="PDF" href="fpdf16/cash_drawer.php?id={$user_id}"><img src="./templates/images/pdf.png"></a>
                            <a title="CSV" href="idx.php?act=cash_drawer_csv"><img src="./templates/images/csv.png"></a>
                            <a title="Doc" href="idx.php?act=cash_drawer_word"><img src="./templates/images/word.png"></a>
                            <!--a title="PNG" href="#" onclick="$D('#transaction_table').tableExport({type: 'png', escape: 'false'});"><img src='http://demo.magestore.com/webpos/skin/frontend/base/default/css/magestore/webpos/images/png.png' /></a-->
                        </div>
                    </div>
                </div>
            </div>
        </div>

    
            <div id="reports_area" class="col-lg-7 col-md-7 col-sm-7 col-xs-7 col_left setting-right" style="top: 0px; z-index: 0; display:none; width:770px;">
            <div id="reports_section_loader" class="webpos_popup_loader" style="display: none;">
                <div class="img-ajax"></div>
            </div>
            <div class="top-content">
                <div class="title-page col-lg-12 col-md-12 col-sm-12 col-xs-12 title-general">
                    <h2 id="reports_title">报告</h2>
                </div>
            </div>
            <div class="clear"></div>
            <div class="content">
                <div id="reports_control">
                    <p class="label">报告类型:</p>
                    <p class="report_type">
                        <select name="report_type" id="report_type" class="control" onchange="loadReport(this.value)">
                            <option value="">-- 请选择一个报告类型 --</option>

                            <option value="x_report">X-报告 (上午报告)</option> 
                            <option value="z_report">Z-报告 (下午报告)</option>
                            <option value="eod_report">每日报告</option>      
                            </select>
                    </p>
                    <button class="" type="button" onclick="refresh_list();">刷新数据</button>
                    <div class="clear"></div>
                </div>
                <div class="clear"></div>
                <div class="tran-list" id="any_report">
                    <table id="report_filter" class="hide" style="width: 100%;">
                        <tbody><tr>
                            <td>
                                <table class="table-bordered webpos_bordered_table">
                                    <thead>
                                    <tr><th style="width: 30%;">Type</th>
                                    <th style="width: 30%;">Order Status</th>
                                    <th style="width: 20%;" class="align_right">From</th>
                                    <th style="width: 20%;" class="align_right">To</th>    
                                    </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>
                                                <select id="s_report_type">
                                                    <option value="cashier">Cashier</option>
                                                    <option value="location">Location</option>
                                                    <option value="customer_group">Customer Group</option>
                                                    <option value="payment">Payment Method</option>
                                                    <option value="general">General</option>
                                                </select>
                                            </td>
                                            <td>
                                                <select id="s_report_status" multiple="">
                                                    <option value="complete">Complete</option>
                                                    <option value="pending">Pending</option>
                                                    <option value="processing">Processing</option>
                                                </select>
                                            </td>
                                            <td class="align_right"><input id="s_report_from" class=" form-control webpos_datetime_picker" type="text"></td>                                    
                                            <td class="align_right"><input id="s_report_to" class=" form-control webpos_datetime_picker" type="text"></td>                              
                                        </tr>
                                    </tbody>
                                </table>
                            </td>
                        </tr>
                    </tbody></table>
                    <div id="report_grid"   style="max-height: 652px;">
                    <!--第一个按钮 start-->
                      <div   style="display: none;" id="op2div">
                         <input type="hidden" name="till_current_balance" id="till_current_balance" value="">    <style>
        .dataTable-gird { height:auto;}
    </style>
    <div class="container">
    <div class="row">
        <div class="dataTable-gird">
            <table id="report_tillx">
                <tbody><tr>
                    <td>
                        <table class="table-bordered webpos_bordered_table">
                            <thead>
                            <tr><th style="width:30%">Magasin</th>
                            <th style="width:30%">Cashier</th>
                            <th style="width:20%" class="align_right">De</th>
                            <th style="width:20%" class="align_right">A</th>    
                            </tr></thead>
                            <tbody>
                                <tr>
                                    <td>French</td>
                                    <td>demo</td>
                                    
                                    <td class="align_right">27 déc. 2015 16:00:00</td>                                    
                                    <td class="align_right">18 déc. 2016 21:26:34</td>                                   
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="tablezreport"><table class="table-bordered webpos_bordered_table">
                            <thead>
                            <tr><th width="80%">Méthode de paiement</th>
                            <th width="10%" align="center">No. of Orders</th>
                            <th width="10%" align="center">Recorded Grand Totals</th>                            
                            </tr></thead>
                            <tbody>
                                                                        <tr>
                                            <td>Cash<br>(<br>Total: 0,00&nbsp;$US ,<br> Opening Cash: 0,00&nbsp;$US,<br> Other In/Out Transactions: 0,00&nbsp;$US<br>)</td>
                                            <td class="align_center">0</td>
                                            <td class="align_right"><span id="cashforpos_money_system">0,00&nbsp;$US</span></td>                                           
                                        </tr>
                                                                        <tr style="border-bottom: 1px solid #0d2131;"></tr>
                                
                                <tr style="border-bottom: 1px solid #0d2131;"></tr>
                                <tr class="total">
                                    <td>Sum of Grand Totals</td>
                                    <td class="align_center"><span id="num_order_total"> 0</span></td>
                                    <td class="align_right"><span id="grand_system">0,00&nbsp;$US</span></td>                                    
                                </tr>
                                                                <tr class="total">
                                    <td>Sum of Discounts</td>
                                    <td class="align_center">0</td>
                                    <td class="align_right"><span id="discount_system">0,00&nbsp;$US</span> </td>                                   
                                </tr>
                                <tr class="total">
                                    <td>Sum of Tax Amounts</td>
                                    <td class="align_center"></td>
                                    <td class="align_right"><span id="tax_system">0,00&nbsp;$US</span></td>                                    
                                </tr>
                            </tbody>
                        </table></div>
                    </td>
                </tr>
            </tbody></table>
            <div class="action" style="margin:20px 0 0;">
                <div class="btn-print">
                <button id="print_x_report" class="scalable">PRINT REPORT</button>
                </div>
            </div>
        </div>
    </div>
    </div>

<script>
    jQuery(document).ready(function () {
        jQuery('#total_value_report').html(0);
    });
    jQuery('#print_x_report').on('click', function () {
        var link = 'http://demo.magestore.com/webpos/webpos/payment/reportprint/report_type/x-report/transfer_amout/0/diff_total/0/';
        window.open(link, "_blank", "scrollbars=yes, resizable=yes, width=500, height=700");
    });
    jQuery('body').on("keydown", '.manual_cal', function (event) {

        if (event.shiftKey == true) {
            // event.preventDefault(); allow to enter % char
        }

        if ((event.keyCode >= 48 && event.keyCode <= 57) ||
                (event.keyCode >= 96 && event.keyCode <= 105) ||
                event.keyCode == 16 ||
                event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 37 ||
                event.keyCode == 39 || event.keyCode == 46 || event.keyCode == 190 || event.keyCode == 110 || event.keyCode == 188) {

        } else {
            event.preventDefault();
        }

        if ((jQuery(this).val().indexOf('.') !== -1 || jQuery(this).val().indexOf(',') !== -1) && event.keyCode == 190)
            event.preventDefault();

        if ((jQuery(this).val().indexOf(',') !== -1 || jQuery(this).val().indexOf('.') !== -1) && event.keyCode == 188)
            event.preventDefault();

        if ((jQuery(this).val().indexOf(',') !== -1 || jQuery(this).val().indexOf('.') !== -1) && event.keyCode == 110)
            event.preventDefault();

    });

</script>


                      </div>  <!--第一个选项 end-->

                     <div style="display: none;" id="op3div">
                     <input type="hidden" name="till_current_balance" id="till_current_balance" value="">    <style>
        .dataTable-gird { height:auto;}
    </style>
    <div class="container">
        <div class="row">
            <div class="dataTable-gird">
                <table id="report_tillz">
                    <tbody><tr>
                        <td>
                            <table class="table-bordered webpos_bordered_table">
                                <thead>
                                <tr><th width="30%">Magasin</th>
                                <th width="30%">Cashier</th>
                                <th width="20%" class="align_right">De</th>
                                <th width="20%" class="align_right">A</th>                           
                                </tr></thead>
                                <tbody>
                                    <tr>
                                        <td>French</td>
                                        <td>demo</td>
                                        <td class="align_right">27 déc. 2015 16:00:00</td>
                                        <td class="align_right">18 déc. 2016 21:43:48</td>                                                              
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="tablezreport">
                                <table class="table-bordered webpos_bordered_table">
                                    <thead>
                                    <tr><th width="60%" align="left">Méthode de paiement</th>
                                    <th width="10%" align="center">No. of Orders</th>
                                    <th width="10%" align="center">Recorded Grand Totals</th>
                                                                            <th width="10%" align="center">Manual Count</th>
                                        <th width="10%" align="center">Difference</th>
                                                                        </tr></thead>
                                    <tbody>
                                                                                        <tr>
                                                    <td>Cash  <button id="count_cash" onclick="showCountCashArea()">Count</button><br>(<br>Total: 0,00&nbsp;$US ,<br> Opening Cash: 0,00&nbsp;$US,<br> Other In/Out Transactions: 0,00&nbsp;$US<br>)</td>
                                                    <td class="align_center">0</td>
                                                    <td class="align_right"><span id="cashforpos_money_system">0,00&nbsp;$US</span></td>
                                                                                                            <td class="align_right"><input onblur="cashCounted(this)" class="manual_cal edit_report_value payment1" type="text" value="" name="cashforpos" id="cashforpos"></td>
                                                        <td class="align_right"><span id="cashforpos_diff">0</span></td>
                                                                                                    </tr>
                                                                                        <tr style="border-bottom: 1px solid #0d2131;"></tr>
                                        
                                        <tr style="border-bottom: 1px solid #0d2131;"></tr>
                                        <tr class="total">
                                            <td style="padding: 4px">Sum of Grand Totals</td>
                                            <td class="align_center"><span id="num_order_total" class="align_center"> 0</span></td>
                                            <td class="align_right"><span id="grand_system">0,00&nbsp;$US</span></td>
                                                                                            <td class="align_right"><span class="edit_report_value totals" id="total_value_report">0</span></td>
                                                <td class="align_right"><span id="total_value_diff">0</span></td>
                                                                                    </tr>
                                                                                <tr class="total">
                                            <td style="padding: 4px">Sum of Discounts</td>
                                            <td class="align_center">0</td>
                                            <td class="align_right"><span id="discount_system">0,00&nbsp;$US</span> </td>
                                                                                            <td class="align_right"><span class="edit_report_value discount" name="discount_value_report" id="discount_value_report">0,00&nbsp;$US</span></td>
                                                <td class="align_right"><span id="discount_value_diff"></span></td>
                                                                                    </tr>
                                        <tr class="total">
                                            <td style="padding: 4px">Sum of Tax Amounts</td>
                                            <td class="align_center"></td>
                                            <td class="align_right"><span id="tax_system">0,00&nbsp;$US</span></td>
                                                                                            <td class="align_right"><span class="edit_report_value tax" name="tax_value_report" id="tax_value_report">0,00&nbsp;$US</span></td>
                                                <td class="align_right"><span id="tax_value_diff"></span></td>
                                                                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </td>
                    </tr>
                </tbody></table>

                <div class="action" style="margin:20px 0 0;">
                    <div class="block-left container">
                        <div class="row">
                            <div class="transfer col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                <div class="row">
                                    <label class="transfer_cashdrawer">Cash Amount Kept in Drawer for Next Shift/ Day</label><input type="text" class="manual_cal cash_report form-control transfer_cashdrawer" name="cash_report" id="cash_report" value="0">
                                </div>
                            </div>
                            <div class="btn-close col-lg-2 col-md-2 col-sm-2 col-xs-2 col-sm-offset-6"><div class="row"><button id="close_store" class="scalable" onclick="saveZreport()">Close Store</button></div></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

<script>


    $D(document).ready(function () {
        $D('#total_value_report').html(0);
    });

    $D('body').on("keydown", '.manual_cal', function (event) {

        if (event.shiftKey == true) {
            // event.preventDefault(); allow to enter % char
        }

        if ((event.keyCode >= 48 && event.keyCode <= 57) ||
                (event.keyCode >= 96 && event.keyCode <= 105) ||
                event.keyCode == 16 ||
                event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 37 ||
                event.keyCode == 39 || event.keyCode == 46 || event.keyCode == 190 || event.keyCode == 110 || event.keyCode == 188) {

        } else {
            event.preventDefault();
        }

        if (($D(this).val().indexOf('.') !== -1 || $D(this).val().indexOf(',') !== -1) && event.keyCode == 190)
            event.preventDefault();

        if (($D(this).val().indexOf(',') !== -1 || $D(this).val().indexOf('.') !== -1) && event.keyCode == 188)
            event.preventDefault();

        if (($D(this).val().indexOf(',') !== -1 || $D(this).val().indexOf('.') !== -1) && event.keyCode == 110)
            event.preventDefault();

    });
</script>
</div><!-- 第二个选项end -->
               <div style="display: none;" id="op4div">
                     <table id="end_of_day_table" class="table-bordered webpos_bordered_table">
    <thead>
        <tr>
            <th>Order#</th>
            <th>Cashier</th>
            <th>Magasin</th>
      <th>Cash Drawer</th>
            <th>Facture au nom</th>
            <th>Total</th>
            <th>Acheté sur</th>
            <th>Statut</th>
        </tr>
    </thead>
    <tbody>
            </tbody>
</table>
<div class="bottom_control">
    <button type="button" class="" data-toggle="collapse" data-target="#eod_export">
        Export Data    </button>
    <div class="clear"></div>
    <div id="eod_export" class="collapse out">
        <a title="Excel" href="#" onclick="$D('#end_of_day_table').tableExport({type: 'excel', escape: 'false'});"><img src="http://demo.magestore.com/webpos/skin/frontend/base/default/css/magestore/webpos/images/xls.png"></a>
        <a title="PDF" href="#" onclick="$D('#end_of_day_table').tableExport({type: 'pdf', escape: 'false', pdfFontSize: '7'});"><img src="http://demo.magestore.com/webpos/skin/frontend/base/default/css/magestore/webpos/images/pdf.png"></a>
        <a title="CSV" href="#" onclick="$D('#end_of_day_table').tableExport({type: 'csv', escape: 'false'});"><img src="http://demo.magestore.com/webpos/skin/frontend/base/default/css/magestore/webpos/images/csv.png"></a>
        <a title="Doc" href="#" onclick="$D('#end_of_day_table').tableExport({type: 'doc', escape: 'false'});"><img src="http://demo.magestore.com/webpos/skin/frontend/base/default/css/magestore/webpos/images/word.png"></a>
        <!--a title="PNG" href="#" onclick="$D('#end_of_day_table').tableExport({type: 'png', escape: 'false'});"><img src='http://demo.magestore.com/webpos/skin/frontend/base/default/css/magestore/webpos/images/png.png' /></a-->
    </div>
</div>



               </div><!-- 第三个选项 end -->




                    </div>
                    <div class="bottom_control hide" id="sreport_export">
                        <button type="button" class="" data-toggle="collapse" data-target="#sreport_export_type">
                            Export Data                        </button>
                        <div class="clear"></div>
                        <div id="sreport_export_type" class="collapse out">
                            <a title="Excel" href="#"><img src="./templates/images/xls.png"></a>
                            <a title="PDF" href="#"><img src="./templates/images/pdf.png"></a>
                            <a title="CSV" href="#"><img src="./templates/images/csv.png"></a>
                            <a title="Doc" href="#"><img src="./templates/images/word.png"></a>
                            <!--a title="PNG" href="#" onclick="$D('#sreport_table').tableExport({type: 'png', escape: 'false'});"><img src='http://demo.magestore.com/webpos/skin/frontend/base/default/css/magestore/webpos/images/png.png' /></a-->
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--这里是个遮罩层 -->
        <div class="webpos_overlay" id="webpos_medium_overlay" style="display: none;" onclick="clocse_overlay()"></div>
		
		
        <div id="webpos_fixed_overlay" class="fixed_overlay" style="display: none;" onclick="hideCountCashArea()">
          
        </div>
         
            <div id="count_cash_area">
                                <div class="dataTable-gird content">
                    <table id="count_cash_table" class="webpos_bordered_table">
                        <tbody><tr>
                            <td style="width: 50%; font-weight: bold;" colspan="2">Note Value</td>
                            <td style="width: 15%; font-weight: bold;">Count</td>
                            <td style="width: 15%; font-weight: bold;">Sum</td>
                        </tr>
                        
                                <tr>
                                    <td style="vertical-align: middle; text-align: left;">$1 note</td>
                                    <td style="vertical-align: middle; text-align: left;"> 1</td>
                                    <td><input style="height: 28px; line-height: 28px;" value="-" class="form-control count_value manual_cal" id="count_0" denovalue=" 1" type="text"></td>
                                    <td><input style="height: 28px; line-height: 28px;" value="-" class="form-control sum_value manual_cal count_0" denovalue=" 1" iddeno="0" type="text"></td>
                                </tr>
                                
                                <tr>
                                    <td style="vertical-align: middle; text-align: left;"> $5 note </td>
                                    <td style="vertical-align: middle; text-align: left;"> 5</td>
                                    <td><input style="height: 28px; line-height: 28px;" value="-" class="form-control count_value manual_cal" id="count_1" denovalue=" 5" type="text"></td>
                                    <td><input style="height: 28px; line-height: 28px;" value="-" class="form-control sum_value manual_cal count_1" denovalue=" 5" iddeno="1" type="text"></td>
                                </tr>
                                
                                <tr>
                                    <td style="vertical-align: middle; text-align: left;">$10 note </td>
                                    <td style="vertical-align: middle; text-align: left;"> 10</td>
                                    <td><input style="height: 28px; line-height: 28px;" value="-" class="form-control count_value manual_cal" id="count_2" denovalue=" 10" type="text"></td>
                                    <td><input style="height: 28px; line-height: 28px;" value="-" class="form-control sum_value manual_cal count_2" denovalue=" 10" iddeno="2" type="text"></td>
                                </tr>
                                
                                <tr>
                                    <td style="vertical-align: middle; text-align: left;">$50 note </td>
                                    <td style="vertical-align: middle; text-align: left;"> 50</td>
                                    <td><input style="height: 28px; line-height: 28px;" value="-" class="form-control count_value manual_cal" id="count_3" denovalue=" 50" type="text"></td>
                                    <td><input style="height: 28px; line-height: 28px;" value="-" class="form-control sum_value manual_cal count_3" denovalue=" 50" iddeno="3" type="text"></td>
                                </tr>
                                
                                <tr>
                                    <td style="vertical-align: middle; text-align: left;">$100 note </td>
                                    <td style="vertical-align: middle; text-align: left;"> 100</td>
                                    <td><input style="height: 28px; line-height: 28px;" value="-" class="form-control count_value manual_cal" id="count_4" denovalue=" 100" type="text"></td>
                                    <td><input style="height: 28px; line-height: 28px;" value="-" class="form-control sum_value manual_cal count_4" denovalue=" 100" iddeno="4" type="text"></td>
                                </tr>
                          </tbody>
                          </table>
                </div>
                <div class="bottom">
                    <button class="scalable" id="btn_clear">Clear</button>
                    <button class="scalable" id="btn_total">Total 0.00</button>
                    <input value="0" id="total_count" type="hidden">
                </div>
            </div>
            
            </div></div>
<!--S: Daniel - updated 10/10/2016 -->
<!--S: Daniel - updated 10/10/2016 - new multipayment calculation -->
<script>/* Code removed by ScrapBook */</script>
<!--E: Daniel - updated 10/10/2016 - new multipayment calculation --><!--E: Daniel - updated 10/10/2016 -->

<div class="bg-create-customer" style="display: none;" onclick="hidePopupCustomer()"></div>
<div id="create-customer" class="modal">
    <div class="modal-dialog">
    <div class="modal-content">
        <div id="form-create-customer-loader"></div>
        <div class="create-customer-fr">                
            <form id="form-create-customer" class="form-create" method="POST">
                <div class="top-create col-lg-12 col-md-12 col-sm-12 col-xs-12">                        
                    <div class="btn-cancel col-lg-3 col-md-3 col-sm-3 col-xs-3">
                        <button type="button" class="btn btn-default" onclick="hidePopupCustomer()">
                        取消
                        </button>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6"><h2>用户信息</h2></div>
                    <div class="btn-save col-lg-3 col-md-3 col-sm-3 col-xs-3">
                        <button type="button" class="btn btn-default" onclick="saveyonghu()">保存</button>
                    </div>
                </div>
                                <div class="input-box col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding: 10px;">
                    <select name="billing[group_id]" id="billing:group_id" class="billingdata form-control" title="Group" fieldkey="group_id"></select>                </div>
                <div id="billing_form" class="">
                    <input name="billing[address_id]" value="" id="billing:address_id" type="hidden">
                    <div class="">
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <input fieldkey="firstname" id="first_name" value="" name="billing[firstname]" placeholder="用户名" class="input-text required-entry form-control billingdata" type="text">
                        </div>
						
						  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <input fieldkey="telephone" id="phone_number" value="" name="billing[telephone]" placeholder="电话" class="input-text form-control billingdata" type="text">
                        </div>
						
                       <!--  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <input fieldkey="lastname" id="last_name" value="" name="billing[lastname]" placeholder="Last name" class="input-text required-entry form-control billingdata" type="text">
                        </div> -->
                    </div>
                    <div class="">
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <input fieldkey="email" id="email_address" value="" name="billing[email]" placeholder="邮箱" class="input-text required-entry validate-email form-control billingdata" type="text">
                        </div>
						<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <input fieldkey="postcode" id="zipcode" value="" name="billing[postcode]" placeholder="邮编" class="input-text form-control billingdata" type="text">
                        </div>
                      
                    </div>
                    <div class="">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <input fieldkey="street0" id="address_1" value="" name="billing[street][0]" placeholder="地址" class="input-text form-control billingdata" type="text">
                        </div>                         
                    </div>
                    <!-- <div class="">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <input fieldkey="street1" id="address_2" value="" name="billing[street][1]" placeholder="Address Line 2" class="input-text form-control billingdata" type="text">
                        </div>                         
                    </div> -->
                    
                    <div class="">
                        <div class="input-box col-lg-6 col-md-6 col-sm-6 col-xs-6">                            
                            <select name="billing[country_id]" id="selProvinces" class="billingdata" title="Country" fieldkey="country"onchange="region.changed(this, 2, 'selCities')" ><option value=""> 请选择 </option>
							
							<!-- {foreach from=$province_list item=province} -->
							<option value="{$province.region_id}">{$province.region_name}</option>
							<!-- {/foreach} -->
														
							</select>                              
                        </div>
						
						
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <select fieldkey="region_id" id="selCities" name="billing[region_id]" class="billingdata required-entry validate-select" title="State/Province" onchange="region.changed(this, 3, 'selDistricts')" style="border-color:#ccc;border-left:0px;">
							
                            <option value="">请选择</option>
							<!-- {foreach from=$city_list item=city} -->	
                            <option value="{$city.region_id}" title="{$city.region_id}">{$city.region_name}</option>
							<!-- {/foreach} -->
							</select>
                            <input fieldkey="region" id="billing:region" name="billing[region]" value="" title="State/Province" class="input-text form-control billingdata required-entry" style="display: none;" type="text">
                        </div>
                    </div>
                    <div class="">
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <input fieldkey="company" id="company" value="" name="billing[company]" placeholder="公司" class="input-text form-control billingdata" type="text">
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <input fieldkey="fax" id="fax_number" value="" name="billing[fax]" placeholder="传真" class="input-text form-control billingdata" type="text">
                        </div>
                    </div>
                    <div class="">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <input fieldkey="vat_id" id="vat_id" value="" name="billing[vat_id]" placeholder="增值税号" class="input-text form-control billingdata" type="text">
                        </div>
                    </div>
                    <div class="">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <label class="save-in-address-book">保存在通讯录</label>
                            <div class="toggle btn btn-default off" data-toggle="toggle" style="width: 0px; height: 0px;" onclick="toggleAddBook(this)">
                              <input id="save_in_address_book_billing" name="save_in_address_book" data-toggle="toggle" class="input-text" type="checkbox">
                              <div class="toggle-group" >
                              <label class="btn btn-primary toggle-on">On</label>
                              <label class="btn btn-default active toggle-off">Off</label>

                              <span class="toggle-handle btn btn-default"></span>
                            </div>
                            </div>    
                        </div>                         
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">/* Code removed by ScrapBook */</script></div>
<div id="bg-shipping-address" style="display: none;" onclick="cancelEditAddress();"></div>
<div id="shipping-address" class="modal">
    <div class="modal-dialog">
    <div class="modal-content">
        <div id="form-shipping-address-loader"></div>
        <div class="create-customer-fr">                
            <form id="form-shipping-address" class="form-create" method="POST">   
                <input name="shipping[address_id]" value="" id="shipping:address_id" type="hidden">
                <input id="shipping:customer_id" value="" name="shipping[customer_id]" style="display: none;" class="input-text" type="text">
                <div class="top-create col-lg-12 col-md-12 col-sm-12 col-xs-12">                        
                    <div class="btn-cancel col-lg-3 col-md-3 col-sm-3 col-xs-3">
                        <button type="button" class="btn btn-default" id="btn-canceledit" onclick="cancelEditAddress()">取消
                        </button>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6"><h2>编辑物流地址</h2></div>
                    <div class="btn-save col-lg-3 col-md-3 col-sm-3 col-xs-3">
                        <button type="button" class="btn btn-default" onclick="saveShippingAddress()">保存</button>
                    </div>
                </div>
                                <div id="shipping_form" class="">
                    <div class="">
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <input fieldkey="firstname" id="shipping:first_name" value="" name="shipping[firstname]" placeholder="First name" class="input-text required-entry form-control shippingdata" type="text">
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <input fieldkey="lastname" id="shipping:last_name" value="" name="shipping[lastname]" placeholder="Last name" class="input-text required-entry form-control shippingdata" type="text">
                        </div>
                    </div>
                    <div class="">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <input fieldkey="telephone" id="shipping:phone_number" value="" name="shipping[telephone]" placeholder="Phone" class="input-text form-control shippingdata" type="text">
                        </div>
                    </div>
                    <div class="">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <input fieldkey="street0" id="shipping:address_1" value="" name="shipping[street][0]" placeholder="Address Line 1" class="input-text form-control shippingdata" type="text">
                        </div>                         
                    </div>
                    <div class="" style="display:none;">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <input fieldkey="street1" id="shipping:address_2" value="" name="shipping[street][1]" placeholder="Address Line 2" class="input-text form-control shippingdata" type="text">
                        </div>                         
                    </div>
                    <div class="">
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <input fieldkey="city" id="shipping:city" value="" name="shipping[city]" placeholder="City" class="input-text form-control shippingdata" type="text">
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <input fieldkey="postcode" id="shipping:zipcode" value="" name="shipping[postcode]" placeholder="Zip" class="input-text form-control shippingdata" type="text">
                        </div>
                    </div>
                    <div class="">
                        <div class="input-box col-lg-6 col-md-6 col-sm-6 col-xs-6">                            
<select name="shipping[country_id]" id="selProvinces"  style="border-left:0px;  border-color:#cccccc"class="shippingdata" title="Country" fieldkey="country" onchange="region.changed(this, 2, 'selCities')"><option value="">请选择 </option>

	
<!-- {foreach from=$province_list item=province} -->
							<option value="{$province.region_id}">{$province.region_name}</option>
							<!-- {/foreach} -->

</select>                              
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <select fieldkey="region_id" class="shippingdata required-entry validate-select" id="selCities" name="shipping[region_id]" title="State/Province" onchange="region.changed(this, 3, 'selDistricts')" style="border:0px">
                                <option value="">请选择</option>
														
							<!-- {foreach from=$city_list item=city} -->	
                            <option value="{$city.region_id}" title="{$city.region_id}">{$city.region_name}</option>
							<!-- {/foreach} -->	  
								  
							
							</select>
                            <input fieldkey="region" id="shipping:region" name="shipping[region]" value="" title="State/Province" class="input-text form-control shippingdata required-entry" style="display: none;" type="text">
                        </div>
                    </div>
                    <div class="">
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <input fieldkey="company" id="shipping:company" value="" name="shipping[company]" placeholder="Company" class="input-text form-control shippingdata" type="text">
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            <input fieldkey="fax" id="shipping:fax_number" value="" name="shipping[fax]" placeholder="Fax" class="input-text form-control shippingdata" type="text">
                        </div>
                    </div>
                    <div class="">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <label class="save-in-address-book">Save in Address Book</label>
                            <div class="toggle btn btn-default off" data-toggle="toggle" style="width: 0px; height: 0px;">
                            <input id="save_in_address_book" name="save_in_address_book" data-toggle="toggle" class="input-text" type="checkbox">
                            <div class="toggle-group" id="edit_add">
                            <label class="btn btn-primary toggle-on">On</label>
                            <label class="btn btn-default active toggle-off">Off</label>
                            <span class="toggle-handle btn btn-default"></span>
                            </div>
                            </div>    
                        </div>                         
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">/* Code removed by ScrapBook */</script></div>
<div id="pos_container">
    <div id="main_container" class="row marginLeft5vw" >
        <div id="menu" class=""><div class="overlay_menu" style="display: none;"></div>
<ul class="pos_menu">
    <li class="menu_item active" id="show-option" onclick="showhideToggle()">        
        <div class="common account"></div>
        <p>账户</p>
        <div class="box-logout" onmouseleave="hideBoxLogout()" >
            <ul class="sub_menu">
                <div class="border-content">
                    <li class="log" id="">
                        <img style="max-height: 110px;" src="./templates/images/logo.png">
                    </li>
                    <li class="display_name" id="display_name">
                        <label class="short_name" id="short_name">{$sname}</label>&gt;
                        <span class="full_name" id="yonghu">{$user.user_name}</span>
<!--                        <span class="glyphicon glyphicon-chevron-down" aria-hidden="true"></span>
                        <span class="glyphicon glyphicon-chevron-up hide" aria-hidden="true"></span>-->
                    </li>
                    <br><br><!-- endl Magnus(4543) -->
                    <li class="log-item" id="logout">
                        <a class="btn btn-default" style="" href="index.php?act=logout" <!--  onclick="showlogin()" --> 
                            <span><img src="./templates/images/icon-logout.png"></span>
                            <span>退出</span>              
                        </a>
                    </li>        
                </div>
            </ul>
        </div>
    </li>
            <li class="menu_item menuactive" id="checkout" onclick="menuClick(this)">
            <div class="common checkout"></div>
            <p>结帐</p>
        </li>
        <li class="menu_item" id="orders" onclick="menuClick(this)">
            <div class="common orders"></div>
            <p>订单</p>
        </li>
      
    <li class="menu_item" id="holded_orders" onclick="menuClick(this)" >
        <div class="common holded_orders"></div>
        <p>持有订单</p>
    </li>
            <li class="menu_item" id="cash_drawer" onclick="menuClick(this)">
            <div class="common cashdrawer"></div>
            <p>钱箱</p>
        </li>   
                <li class="menu_item" id="reports" onclick="menuClick(this)" >
            <div class="common reports"></div>
            <p>报告</p>
        </li>   
        <li class="menu_item" id="settings" onclick="menuClick(this)">
        <div class="common settings"></div>
        <p>设置</p>
    </li>
</ul>
<div class="store_view" style="display: none;">    
            <div id="pending_orders">
            <button title="Offline Orders"><div id="number_order_pending" class="number_order">0</div>Offline Orders</button>
        </div>
            <div id="webpos_currency">
            </div>
    <div id="webpos_websites">
        <div class="webpos_liststore">
    <select name="webpos_liststore">
                            <option selected="" 1="" value="http://demo.magestore.com/webpos/webpos/index/index/">
                        Madison Island - English                    </option>
                                        <option value="http://demo.magestore.com/webpos/webpos/index/index/?___store=french">
                        Madison Island - French                    </option>
                                        <option value="http://demo.magestore.com/webpos/webpos/index/index/?___store=german">
                        Madison Island - German                    </option>
                        </select>
</div>
    </div>
</div>

<!-- Endl Magnus(7686) --></div>
        
        
                <div class="col-lg-7 col-md-7 col-sm-7 col-xs-7 col_left" id="product-left">
            <div id="col_left_loader">
                <div class="img-ajax"></div>
                <div class="loading_message">
                    Loading product information                </div>
            </div>
            <div id="col_left_firsttime_loader">
                <div class="img-ajax"></div>
                <div class="loading_message">
                    Loading products information for the first time use, this may take a few minute. Please wait...                    <div id="loading_status"></div>
                </div>
            </div>
            <div class="top_bar left">
                <!--
                <div class="incon-menu col-lg-1 col-md-1 col-sm-1 col-xs-1">
                    <img onclick="showHideMenu('checkout')" id='showmenu_icon' class='pointerCursor' src='http://demo.magestore.com/webpos/skin/frontend/base/default/images/icon/menu.png'/>
                </div>
                -->
                <div class="top_bar_right col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <div class="category col-lg-4 col-md-4 col-sm-4 col-xs-4 " id="category_area">
                        
<div class="dropdown" id="category_dropdown">
    <div class="action-filter"  onclick="showcat();">
        <a class="menu-all-cats start_cat" href="#menu2"><span class="caret"></span><span>全部分类</span></a>
        <a class="menu-all-cats upload_cat" href="#menu2"><span class="caret"></span><span class="text">全部分类</span></a>
    </div>
    

</div>

<script type="text/javascript">/* Code removed by ScrapBook */</script>
                    </div>
                    <!--
                   <div class='product_search width10percentage' id='product_search_area'>
                       <img onclick="showSearchForm()" id='search_icon' class='pointerCursor' src='http://demo.magestore.com/webpos/skin/frontend/base/default/images/icon/search.png' />
                   </div>
                    -->
                    <div class="product_search col-lg-8 col-md-8 col-sm-8 col-xs-8 " id="product_search">
                        
                            <input class="form-control" placeholder="输入商品名称" id="product_search_keyword" name="keyword" type="text" onblur="checkpname()">
                      
                    </div>
                    <!--
                  <div onclick="cancelSearch()" class='col-lg-1 col-md-1 col-sm-1 col-xs-1 pointerCursor hide' id='cancel_search_icon'>
                      <img src='http://demo.magestore.com/webpos/skin/frontend/base/default/images/icon/cancel.png' />
                  </div>
                   
                  <div id="global_search_autocomplete" class="autocomplete" style="z-index:10;overflow-y:auto;max-height:450px; width: 98% !important"></div>
                    -->
                </div>
                <div class="clear"></div>
				
				 <script>
		  // 搜索商品
				function checkpname(){
				
					var pname = $("#product_search_keyword").val();	
				
					
				
					
					$.ajax({ 
					
						url: "index.php?act=search",
						cache:false,
						data: {'pname':pname}, 
						dataType: 'json', 
						type: 'post', 
						
						 beforeSend:function(){
             
							   $('#ajaxload').show();
							   $("#ajaxload").append('<img src="templates/images/ajax-loader2.gif"  style=" position: fixed;top: 50%;left:50%;z-index:100; opacity: 1;"/>');
							},
							
						success: function(data){
						
								$('#ajaxload').hide();
							$("#ajaxload img").remove();
												
								 $('html').toggleClass('mm-opened mm-blocking mm-background mm-opening'); 
								 $('#menu2').toggleClass('mm-current mm-opened');
			   
								document.getElementById("webpos_overlay").style.display="none";
								
								
								document.getElementById('product_content').innerHTML = data.content;
								$("#menu2").hide();
						}
					});
				
				}
																	  
				</script>		
				
				
            </div>
            <div class="col_content_left">
                
                <!--商品列表 start-->
                <div id="content" >
                    <div id="product_content"><!-- Product list -->

                        <div class="product_list">
						   <div id="zongpage" style="display:none;">{$zongpage}</div>
                            <ul class="product-slide" id="product_list_wrapper">
                                <li class="rows ">
                                        

						<!--{foreach from=$goods item=g name=g}-->		
                                    <div max_sales_qty="10000" min_sales_qty="" tier_price_data="[]" qtyinc="1" tax_amount="2.31" class="product loadedAtList col-lg-3 col-md-3 col-sm-3 col-xs-3" id="prd_380" prd_type="simple" hasoption="0">
                                        <div class="item" hasoption="0" prdid="{$g.goods_id}"  onclick="checkgg({$g.goods_id},{$g.num});">
                                            <div class="img-product">
                                                <div class="prd_sku">{$g.goods_sn}</div>
                                                <div class="prd_price_bg"></div><div class="prd_price"><span class="prd_price_special"><span class="price">${$g.shop_price}</span></span></div><img class="product_image" src="../{$g.goods_thumb}" imgpath="./images/hdb002_1.jpg">
                                            </div>
                                            <h2 id="prd_name_380">{$g.goods_name}</h2>
                                            <p id="prd_fullname_380" class="hide">{$g.goods_name}</p>
                                        </div> 
                                        
                                        <!--商品规格 start-->
                                      
									  <!-- {if $g.num > 0} -->
									  
										
										 
										
                                        <div class="product_options" id="{$g.goods_id}_options_popup" price_condition="[{&quot;92&quot;:&quot;22&quot;,&quot;isSaleable&quot;:&quot;true&quot;,&quot;price&quot;:0},{&quot;180&quot;:&quot;81&quot;,&quot;isSaleable&quot;:&quot;true&quot;,&quot;price&quot;:0},{&quot;180&quot;:&quot;80&quot;,&quot;isSaleable&quot;:&quot;true&quot;,&quot;price&quot;:0},{&quot;180&quot;:&quot;79&quot;,&quot;isSaleable&quot;:&quot;true&quot;,&quot;price&quot;:0},{&quot;180&quot;:&quot;78&quot;,&quot;isSaleable&quot;:&quot;true&quot;,&quot;price&quot;:0},{&quot;180&quot;:&quot;77&quot;,&quot;isSaleable&quot;:&quot;true&quot;,&quot;price&quot;:0}]" originalprice="185" style="display: none;">
						<ul>
							<div class="product-name col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding:0">
								<h2>Ludlow Oxford Top
								<button type="button" class="btn btn-warning" onclick="addToCart({$g.goods_id})">加入购物车</button>
								</h2>
							</div>									  
							<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding:0">
								<div class="col col-lg-6 col-md-6 col-sm-6 col-xs-6" style="padding-left:0px; padding-right:0px;">
									<div class="pospanel panel-default">
										<div class="panel-heading">选择属性</div>
											<div class="options" id="options_label_area">
												<ul>
												
												<!--{foreach from=$g.specification item=gg name=gg}-->	
												{if $gg.name == "颜色"}
												<li optiontype="configurable" id="420_color" onclick="showProductOptions('420','color',this)" class="420_options_label">
												<span>{$gg.name}<span class="required">*</span></span>
												<span class="glyphicon glyphicon-chevron-right" aria-hidden="true">
												</span>
											   </li>
											   {/if}
											   <!--{/foreach}-->
											   
												
											</ul>
							
							           </div>
							     </div>
							 </div>
							 
                     <div class="col col-value col-lg-6 col-md-6 col-sm-6 col-xs-6" style="padding-left:0px; padding-right:0px;">
						<div class="pospanel panel-default">
							<div class="panel-heading">
							<span>价格 <span finalprice="185" id="totals_price_420" class="bundle_price">
							<span class="price">${$g.shop_price}</span><span></span></span></span>
							</div>
                                                        
                                                        
                                                        
								<div class="options">
																			
										<ul id="420_size_values" class="420_option_values">
											 <input type="hidden" optioncode="size" optionid="180" id="420_size_value" class="input_options input_options_420" value="80" optionlabel="S">
										
											<div id="guige{$g.goods_id}" style="display:none;">0</div>
											
											<!--{foreach from=$g.specification item=gg name=gg}-->	
											<!--{foreach from=$gg.values item=ggg name=ggg}-->	
											
											 <li onclick="selectProductOption('{$ggg.id}', 'size', '{$g.goods_id}', 'XS',this)" value="81">{$ggg.label}
											<span class="glyphicon glyphicon-ok prd_options_selected_icon prd_options_selected_icon_size hide" id="420_size_81_selected_icon"></span>
											</li>
											<!--{/foreach}-->
											<!--{/foreach}-->
											
											<!-- <li onclick="selectProductOption('420', 'size', '80', 'S')" value="80">S
											<span class="glyphicon glyphicon-ok prd_options_selected_icon prd_options_selected_icon_size" id="420_size_80_selected_icon"></span>
											</li>
											<li onclick="selectProductOption('420', 'size', '79', 'M')" value="79">M
											<span class="glyphicon glyphicon-ok prd_options_selected_icon prd_options_selected_icon_size hide" id="420_size_79_selected_icon"></span>
											</li>
											<li onclick="selectProductOption('420', 'size', '78', 'L')" value="78">L
											<span class="glyphicon glyphicon-ok prd_options_selected_icon prd_options_selected_icon_size hide" id="420_size_78_selected_icon"></span>
											</li>
											<li onclick="selectProductOption('420', 'size', '77', 'XL')" value="77">XL
											<span class="glyphicon glyphicon-ok prd_options_selected_icon prd_options_selected_icon_size hide" id="420_size_77_selected_icon"></span>
											</li> -->
									 </ul>
									 
							   </div>
                             </div>
                         </div>
                        </div>
                     </ul>
                 </div>
				 <!-- {/if} -->
				       
				</div>		   
				<!--{/foreach}-->	
				
                                </li>
                               
                              
                             
                            </ul>
                        </div>

                    </div>
                </div>  
                
             <!--商品列表 end-->  

			 <script>
		  
				function addToCart(gid){
									
					//获取商品属性ID
					 var guige =  parseInt($('#guige'+gid).html());	
					 					
							
					$.ajax({ 
					
						url: "index.php?act=addtocart",
						cache:false,
						data: {'gid':gid,'guige':guige}, 
						dataType: 'json', 
						type: 'post', 
						
						   beforeSend:function(){
             
							   $('#ajaxload').show();
							   $("#ajaxload").append('<img src="templates/images/ajax-loader2.gif"  style=" position: fixed;top: 50%;left:50%;z-index:100; opacity: 1;"/>');
							},
			
						success: function(data){
						
							$('#ajaxload').hide();
							$("#ajaxload img").remove();
												
							
												
							$('#footer_right_overlay').addClass('hide');					
							//document.getElementById('total_number_item').innerHTML = data.cnum;	
							//document.getElementById('zongji').innerHTML = data.zongji;			
							
							//document.getElementById('webpos_subtotal_button').innerHTML = data.zongji;							
							//document.getElementById('grand_total_webpos').innerHTML = data.zongji;		
							//document.getElementById('success_orderGrandTotal').innerHTML = data.zongji;		
							
							document.getElementById('qiehuan').innerHTML = data.content;
							//$('#webpos_cart').show(); 
							
							//if(data.gnum >1 ){
																							
							//document.getElementById("webpos_overlay").style.display="block"; 
								
							//	$('#catnum'+data.gid).text(data.gnum);
							//	$('#catnum'+data.gid).show();		

							//}	

           //hjl  隐藏规格弹窗
           var id='#'+gid+'_options_popup';
           
           $(id).hide();



					
						}
					});
				
				}
																	  
				</script>		
			 
                
   <!--自定义添加到购物车 start-->             
                
  <div class="customer-sale" style="display: none;">
        <form class="form col-lg-7 col-md-7 col-sm-8 col-xs-9">
    <div class="form-group bg-white">
        <div class="name col-lg-3 col-md-3 col-sm-3 col-xs-3">商品名称</div>
        <div class=" col-lg-9 col-md-9 col-sm-9 col-xs-9">
		<input id="name_custom_sale" placeholder="商品名" class="input-text required-entry form-control" type="text">
		</div>
    </div>
	
    <div class="form-group bg-white">
        <div class="shippble col-lg-3 col-md-3 col-sm-3 col-xs-3">配送</div>
        <div class=" col-lg-9 col-md-9 col-sm-9 col-xs-9">
		
		<div class="toggle btn btn-primary" id="shipable_wp" data-toggle="toggle" style="width: 0px; height: 0px;"  onclick="toggleShippable(this)"> 
		<input checked="" data-toggle="toggle" class="input-text" type="checkbox">
		<div class="toggle-group">
		<label class="btn btn-primary toggle-on">是</label>
		<label class="btn btn-default active toggle-off">否</label>
		<span class="toggle-handle btn btn-default"></span>
		</div>
		</div>
		
		
		</div>
    </div>
	
	
    <div class="form-group bg-white input-price">
        <div class="price col-lg-6 col-md-6 col-sm-6 col-xs-6">价格</div>
        <div class=" col-lg-6 col-md-6 col-sm-6 col-xs-6">
		
		<input placeholder="&yen;0" id="txtScream" class="input-text form-control" type="text">
		
		</div>
    </div>      
    <div class="form-group bg-white input-price">
        <div class="price col-lg-6 col-md-6 col-sm-6 col-xs-6">税类型</div>
        <div class=" col-lg-6 col-md-6 col-sm-6 col-xs-6">
            <select id="custom_sale_tax_class_id">
                <option value="0">无</option>
                {foreach from=$tax_type item=tax}
                	<option value="{$tax.tax_id}">{$tax.tax_name}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group bg-white input-price">
        <div class="price col-lg-6 col-md-6 col-sm-6 col-xs-6">数量</div>
        <div class=" col-lg-6 col-md-6 col-sm-6 col-xs-6"><input placeholder="1" value="1" id="custom_sale_qty" class="input-text form-control" type="text"></div>
    </div>
	
	 <!--数字区域 start-->
	
    <div class="form-group">
        <ul>
            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <button type="button" class="btn btn-default" value="1"  onclick="connectionDigital(this);">1</button>
            </li>
            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <button type="button" class="btn btn-default" value="2" onclick="connectionDigital(this);">2</button>
            </li>
            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <button type="button" class="btn btn-default" value="3" onclick="connectionDigital(this);">3</button>
            </li>
        </ul>        
        <ul>
            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <button type="button" class="btn btn-default" value="4" onclick="connectionDigital(this);">4</button>
            </li>
            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <button type="button" class="btn btn-default" value="5" onclick="connectionDigital(this);">5</button>
            </li>
            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <button type="button" class="btn btn-default" value="6" onclick="connectionDigital(this);">6</button>
            </li>
        </ul>
        <ul>
            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <button type="button" class="btn btn-default" value="7" onclick="connectionDigital(this);">7</button>
            </li>
            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <button type="button" class="btn btn-default" value="8" onclick="connectionDigital(this);">8</button>
            </li>
            <li class="col-lg-4 col-md-4  col-sm-4 col-xs-4">
                <button type="button" class="btn btn-default" value="9" onclick="connectionDigital(this);">9</button>
            </li>
        </ul>
        <ul>
            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <button id="delete_custom_sale" type="button" class="btn btn-default clear-number" onclick="backspace();"></button>
            </li>
            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <button type="button" class="btn btn-default" value="0" onclick="connectionDigital(this);">0</button>
            </li>
            <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <button type="button" class="btn btn-default" value="00" onclick="connectionDigital(this);">00</button>
            </li>        
        </ul>
    </div>
	<!--数字区域 end-->
	
	
    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"><button type="button" id="add_to_cart_wp" class="btn btn-warning" onclick="customeCartAdd();">添加到购物车</button></div>
</form>
<script type="text/javascript">/* Code removed by ScrapBook */</script>
 </div>
				
<!--自定义添加到购物车 end-->    			
				
				
				
            </div>
			
			

            <div class="footer ">
                <div class="footer-content">
                    <div class="col-lg-5 col-md-5 col-sm-5 col-xs-5" id="">

                        <div id="numberProduct"> 
                            Totals:  products                        </div>

                        <div id="offline">
                            <button id="mode_status" class="nowonline" value="on" onclick="changeOffline(this)">
                            Online
                            </button>
                            <input id="network_status" value="on" type="hidden">
                        </div>
                        <div id="status"></div>
                                                    <div id="till_info" class="bottom_button">Cash Drawer Default</div>
                                            </div>

					<div id="fenyenum" value="1" style="display:none;"> 1 </div>	
					
					<div id="catid" value="" style="display:none;">  </div>	
					
                    <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2" id="productPager" style="padding: 0px;">

                        <ul class="pager" >
                            <li><a href="javascript:void(0);" id="bt_previous_product_page" onclick="fenyejian()"><span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span></a></li>
                            <li><a href="javascript:void(0);" id="bt_next_product_page" onclick="fenyejia()"><span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span></a></li>
                        </ul>
                    </div>
                    <div id="customer-sale-btn" class="col-lg-5 col-md-5 col-sm-5 col-xs-5">
                        <button type="button" class="btn"  onclick="showCustomersale()">定制商品</button>
                    </div>
                    <div id="cancel-sale-btn" class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="display: none;">
                        <button type="button" class="btn" onclick="cancelCustomersale()">
						<span class="glyphicon glyphicon-remove" aria-hidden="true"></span><span>取消</span>
						</button>
                    </div>

                </div>

            </div>

        </div>
        
        
    <div id="qiehuan">
          <div class="col-lg-5 col-md-5 col-sm-5 col-xs-5 col_right" id="total-right">
            <div id="col_right_loader">
                <div class="img-ajax"></div>
            </div>
            <div class="top_bar">
                <img title="Empty Cart" onclick="clearcart()" id="customer_loader" class="pointerCursor" src="templates/images/clear.png">
                 <h2 class="title-cart">购物车(<span id="total_number_item"> {if $result.cnum > 0 } {$result.cnum} {else}0{/if}</span>)</h2>
                <img id="continue_select_product" class="pointerCursor hide" src="templates/images/back.png" onclick="showCategory()">
                <div class="top_bar_right">
                    <img title="Add Order Comment" id="customer_edit_icon" class="pointerCursor" src="templates/images/order_comment.png" onclick="showhideOrderCommnent('order-comment');">                    
                </div>                                
                <div class="clear"></div>
                <div class="order-comment" id="order-comment" style="display: none;">
                    <div class="comment">
                        <div class="col col-lg-7 col-md-7 col-sm-7 col-xs-7">订单备注:</div>
                        <div class="col-lg-5 col-md-5 col-sm-5 col-xs-5" style="padding: 0px;">
                        <button class="btn btn-warning" style="float: right; margin-left: -11px;" onclick="saveOrderComment();">保存</button>
                        </div>                                            
                        <form>
                            <textarea id="order-comment-content"></textarea>
                        </form>
                    </div>                    
                </div>
            </div>
            <div class="col_content_right" id="cart_webpos_area">
                <div id="cart_webpos">
                    
<div class="cart">
    <div class="manage-customer add-customer col-lg-12 col-md-12 col-sm-12 col-xs-12">
        <div id="webpos_customer_overlay" class="hide">
        </div>
        <h2 class="col-lg-8 col-md-8 col-sm-8 col-xs-8" id="add-customer"  onclick="showCustomers();">添加用户</h2>
        <div class="button-orders col-lg-2 col-md-2 col-sm-2 col-xs-2" style="line-height: 65px; padding: 0px 5px;">
            
        </div>
        <div class="button-delete col-lg-2 col-md-2 col-sm-2 col-xs-2" style="padding: 0px 5px;">
            <button class="btn btn-delete" id="remove-customer" style="display: none; width: 100%; overflow: hidden;" onclick="removeCustomer()">删除

            </button>
        </div>
    </div>
    <div class="shopping-cart" id="webpos_cart_area">
        <div id="webpos_cart_overlay" class="hide">
        </div>
        <!--div style="position: absolute;top: 0px;left: 0px;width: 100%;height: 100%;z-index: 10;background-color: rgba(255, 255, 255, .8);" id='webpos_cart_custom_sale' class='hide'><img id='cart_loader' style="position: absolute;top: 5px;left: 50%;z-index: 10" src='' /></div-->
        <div id="webpos_cart">
    <script>/* Code removed by ScrapBook */</script>
	
		<!-- 购物车商品 -->
		
		<!--{foreach from=$cartgoods item=cat}-->

		<div class="product prd_419 needupdate" prdid="419" product_price="275" itemid="" custom_price="" qtyinc="1" original_price="275" min_sales_qty="" max_sales_qty="10000" custom_option_index="prd_1" selected_option="14_80_index_1" id="dele" options="92-14|180-80" qty="1" tax_amount="NaN">
				<div class="img-product col-lg-1 col-md-1 col-sm-1 col-xs-1" onclick="showEditPopup({$cat.goods_id},this)">
					<img src="../{$cat.goods_thumb}">
					<span id="catnum{$cat.goods_id}" class="number" {if $cat.goods_number gt 1 }{else} style="display:none;" {/if}>{$cat.goods_number}</span>
				</div>
				<div class="name-product col-lg-6 col-md-6 col-sm-6 col-xs-6" onclick="showEditPopup({$cat.goods_id},this)">
					<div class="product_name hasoptions">{$cat.goods_name}</div>
					<div class="product_options">{$cat.goods_attr}</div>
				</div>
				<div class="price col-lg-4 col-md-4 col-sm-4 col-xs-4" onclick="showEditPopup({$cat.goods_id},this)">
					<span class="webpos_item_subtotal row_total"><span class="price">{$cat.goods_price}</span></span>
					<div class="webpos_item_original"></div>
				</div>



				<div class="delete col-lg-1 col-md-1 col-sm-1 col-xs-1" onclick="deleteProduct('{$cat.goods_id}')">
					<div class="webpos_item_subtotal">X</div>
				</div>
				<div class="clear" onclick="showEditPopup('419_14_80_index_1','http://demo.magestore.com/webpos/media/catalog/product/cache/1/thumbnail/120x/9df78eab33525d08d6e5fb8d27136e95/w/b/wbk006a.jpg','275')"></div>
		</div>

		<!--{/foreach}-->
	
	
            </div>
			
			
			
  <div id="pos_totals">
    <div id="total_wp" class="">
    <div class="form-cart">
    <div style="" class="el1 col-lg-8 col-md-8 col-sm-8 col-xs-8">
        总计    </div>
    <div style="" class="el2 col-lg-4 col-md-4 col-sm-4 col-xs-4">
        <div id="webpos_cart_subtotals" class="webpos_item_subtotal">$<span id="zongji" class="price">{if $result.zongji > 0 } {$result.zongji} {else}0.00{/if}</span></div>
    </div>
</div>
<!-- Discount button -->
    <div class="subtotal">
        <div id="add-discount" class="form-cart">
            <div class="el1 no-active">
                优惠            </div>
        </div>
    </div>
	
	
<script>
function showEditPopup(gid,obj){

	$.ajax({ 
					
						url: "index.php?act=showEditPopup",
						cache:false,
						data: {'gid':gid}, 
						dataType: 'json', 
						type: 'post', 
						success: function(data){
																			
						document.getElementById('edit_cart_item_popup').innerHTML = data.content;	
            //hjl  计算位置信息
           var left = $(obj).parent().offset().left-document.documentElement.scrollLeft;
           var top  =  $(obj).parent().offset().top-document.documentElement.scrollTop;
           
           var left1=left-280;
           var top1=top-50;

  
   $("#edit_cart_item_popup").offset({left:left1,top:top1});			
						$('#edit_cart_item_popup').css('opacity',1);
            $(obj).parent().addClass('active');
						document.getElementById("webpos_overlay").style.display="block";  
						
												
								
						}
	});
					
					

 

}
</script>


<!-- -->
<!--点击 apply  显示这两个选项-->

<div id="current_dis_wp" onclick="showDiscount()" style="cursor: pointer;display:none;" class="online_totals form-cart" >
    <div colspan="1" style="" class="el1 col-lg-8 col-md-8 col-sm-8 col-xs-8">
                    优惠 (用户优惠)            </div>
    <div id="all_discount_wp" onclick="showDiscount()" style="" class="el2 col-lg-4 col-md-4 col-sm-4 col-xs-4">
        <!--            <span class="price webpos_item_subtotal">--><!--</span>-->
            <span class="price webpos_item_subtotal"><span class="price">-$<font id="yhprice">0.00</font> </span></span>
            </div>
</div>

<div class="online_totals form-cart" style="display: none;">
    <div style="" class="el1 col-lg-9 col-md-9 col-sm-9 col-xs-9">
        手续费    </div>
    <div style="" class="el2 col-lg-3 col-md-3 col-sm-3 col-xs-3">
        <span class="price">$0.00</span>    </div>
</div>


<div class="online_totals form-cart" style="display: none;">
    <div style="" class="el1 col-lg-8 col-md-8 col-sm-8 col-xs-8" colspan="1">
                    税           </div>
    <div style="" class="el2 col-lg-4 col-md-4 col-sm-4 col-xs-4"><span class="price">$0.00</span></div>
</div>



 <div id="grand_total_wp_show" >
    <div class="online_totals form-cart" style="display: none;">
    <div style="" class="el1 col-lg-8 col-md-8 col-sm-8 col-xs-8">
        <strong>总计</strong>
    </div>
    <div style="" class="el2 col-lg-4 col-md-4 col-sm-4 col-xs-4">
        <strong id="grand_total_webpos"><span class="price">${if $result.zongji > 0 }{$result.zongji}{else}0{/if}</span></strong>
    </div>
    </div>
</div>

<!--点击 apply end-->



<script type="text/javascript">/* Code removed by ScrapBook */</script><div id="grand_total_wp_show_hide" style="display: none;">
<div class="online_totals form-cart">
    <div style="" class="el1 col-lg-8 col-md-8 col-sm-8 col-xs-8">
        <strong>Grand Total</strong>
    </div>
    <div style="" class="el2 col-lg-4 col-md-4 col-sm-4 col-xs-4">
        <strong id="grand_total_webpos"><span class="price">$0.00</span></strong>
    </div>
</div>
</div>
</div>

</div>
    </div>
</div>
<div id="cart_item_sample" class="hide">
    <div class="product" prdid="" product_price="" itemid="" custom_price="">
        <div class="img-product col-lg-1 col-md-1 col-sm-1 col-xs-1">
            <img src="webpos.htm">
            <span class="number">0</span>
        </div>
        <div class="name-product col-lg-6 col-md-6 col-sm-6 col-xs-6">
            <div class="product_name"></div>
            <div class="product_options"></div>
        </div>
        <div class="price col-lg-4 col-md-4 col-sm-4 col-xs-4">
            <span class="webpos_item_subtotal row_total">0</span>
            <div class="webpos_item_original"></div>
        </div>
        <div class="delete col-lg-1 col-md-1 col-sm-1 col-xs-1">
            <div class="webpos_item_subtotal">X</div>
        </div>
        <div class="clear"></div>
    </div>
</div>
<div class="bg-fade" style="display: none;" onclick="cancelRefundPopup()"></div>
<!-- <div class=fade-login></div>-->
<script type="text/javascript">/* Code removed by ScrapBook */</script>
                </div>
            </div>
			
			
			
          <div class="footer">
                <div id="footer_right_overlay" class="" ></div>
                <!--
                <button id='bt_remove_tax' onclick='toogleTax()' class='hide btn'>Remove/Add Tax</button>
                -->
                <div id="bt_hold_order" class="" onclick="showBeforeHoldPopup()" style="bottom: 0px; display: none;">
                持有订单
                </div>

                <div onclick="saveCart()" id="bt_checkout" class="pointerCursor " style="bottom: 0px;">
                    <div class="label">确认订单</div>
                    <div class="value">
                        <div class="" id="webpos_subtotal_button"><span class="price"> ${if $result.zongji > 0 }{$result.zongji}{else}0{/if}</span></div>
                        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="clear"></div>
                            </div>
			
			
			
        </div>
    </div>
        
        
        
        
    <!--订单信息 start-->

        <div id="order_info" class="orderHide">
            <div id="checkout_loader">
                <div class="img-ajax"></div>
            </div>
            <div id="order_info_wp">
    <div id="shipping_payment_wrapper" class="">
        <div class="shipping_payment_area">
            <div class="shipping">
                <div class="pospanel" id="shipping_area">
                    <div id="edit_shipping_address" onclick="showEditAddress()" >编辑地址</div>

                    <div class="panel-heading" onclick="shippingHeaderClick(this)">物流                    


                    </div>
                    <div class="panel-body hidding" style="display: none;">
                        <form id="webpos_shipping_method_form">
                            <div id="shipping_method">
                                       <dl class="sp-methods">
<!-- <dt>United Parcel Service</dt> -->
<dd>
<ul>

{foreach from=$shipping_list item=list name=n}
<li onclick="selectShippingMethod(save_data_url, 'ups_GND', 'Ground');">
<style type="text/css">
#advice-validate-one-required-by-name-s_method_ups_GND{
display: none !important;
}
</style>
<input name="shipping_method" type="radio" value="{$list.shipping_id}" id="s_method_ups_GND" class="radio validate-one-required-by-name hide">
<label for="s_method_ups_GND">{$list.shipping_name}                     
</label>
<span class="glyphicon glyphicon-ok  {if $list.shipping_id == 1}  {else} hide{/if} shippingSelectedIcon" id="ups_GND_selected_icon"></span>

<span class="price"></span>                                                                                           

</li>
{/foreach}	

<!-- <li onclick="selectShippingMethod(save_data_url, 'ups_3DS', '3 Day Select');">
<style type="text/css">
#advice-validate-one-required-by-name-s_method_ups_3DS{
display: none !important;
}
</style>
<input name="shipping_method" type="radio" value="ups_3DS" id="s_method_ups_3DS" class="radio validate-one-required-by-name hide">
<label for="s_method_ups_3DS">3 Day Select                        
</label>
<span class="glyphicon glyphicon-ok hide shippingSelectedIcon" id="ups_3DS_selected_icon"></span>

<span class="price">$14.94</span>                                                                                            </li>


<li onclick="selectShippingMethod(save_data_url, 'ups_1DA', 'Next Day Air');">
<style type="text/css">
#advice-validate-one-required-by-name-s_method_ups_1DA{
display: none !important;
}
</style>
<input name="shipping_method" type="radio" value="ups_1DA" id="s_method_ups_1DA" class="radio validate-one-required-by-name hide">
<label for="s_method_ups_1DA">Next Day Air                        
</label>
<span class="glyphicon glyphicon-ok hide shippingSelectedIcon" id="ups_1DA_selected_icon"></span>

<span class="price">$32.52</span>                                                                                            </li> -->


</ul>
</dd>
<!-- <dt>Webpos Shipping</dt>
<dd>
<ul>
<li onclick="selectShippingMethod(save_data_url, 'webpos_shipping_webpos_shipping', 'Webpos Pickup');">
<input name="shipping_method" type="radio" value="webpos_shipping_webpos_shipping" id="s_method_webpos_shipping_webpos_shipping" checked="checked" class="radio validate-one-required-by-name hide">
<label for="s_method_webpos_shipping_webpos_shipping">Webpos Pickup                        
</label>
<span class="glyphicon glyphicon-ok  shippingSelectedIcon" id="webpos_shipping_webpos_shipping_selected_icon"></span>

<span class="price">$0.00</span>                                                                                            </li>
</ul>
</dd>
<!-- Customize edit shipping cost
<dt>
Custom Shipping Amount               <div>
<input value="" type='text' id='webpos_shipping_cost' class=' form-control ' style="width:50%;float:left;"/> 
<div style="width:25%;float:right;" onclick="applyCustomShippingCost()" class='btn'>Apply</div>
<div class='clear'></div>
</div>
</dt>
-->
</dl>
                            </div>
                        </form>
                        <div id="address">
                        </div>
                    </div>
                </div>

            </div>
            <div class="payment">
                <div class="pospanel" id="payment_area">
                    <div class="panel-heading"  onclick="paymentHeaderClick()">支付                        <div class="payment-remain-info">
                            <label id="remaining_label"></label>
                            <span id="remaining_amount"><span class="price"></span></span>
                        </div>
                    </div>
                    <div class="panel-body">

                        <form id="webpos_payment_method_form">
                            <div class="hide" id="cash_remain">
                                <div class="">
                                    <div class="text-right col-lg-8 col-md-8 col-sm-8 col-xs-8"><span>Amount Tendered: </span></div>
                                    <div class="text-right col-lg-4 col-md-4 col-sm-4 col-xs-4"><span id="cashin_value_label">0</span></div>
                                </div>
                                <div class="">
                                    <div class="text-right col-lg-8 col-md-8 col-sm-8 col-xs-8"><span>Remaining: </span></div>
                                    <div class="text-right col-lg-4 col-md-4 col-sm-4 col-xs-4"><span id="remain_value_label"><span class="price">$0.00</span></span></div>
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div id="payment_method">
                                <div class="onestepcheckout-payment-methods">
									
				<dl class="sp-methods" id="checkout-payment-method-load">
                       <style type="text/css">
                        #advice-validate-one-required-by-name-p_method_cp1forpos{
                            display: none !important;
                        }
						
						.payment_label label{font-weight:100 !important;}
						li label{
						  font-weight:100;
						}
						
						
						
                    </style>
					
				<!-- {foreach from=$payment_list item=payment name=n} -->	
                <dt code="cp1forpos" class="payment_label">
                    			
                        <span class="no-display"><input id="p_method_cp1forpos" value="{$payment.pay_id}" type="radio" name="payment[method]" title="Custom payment 1"  class="radio validate-one-required-by-name"></span>
                      <label for="p_method_cp1forpos" onclick="showdd(this);">{$payment.pay_name}                         
					  <span class="need_pay_amount" id="cp1forpos_need_pay_amount"></span>
                      </label>
                    <span class="glyphicon glyphicon-ok     
					
					{if $payment.pay_id == 1}
					{else}
					hide   
					{/if}
					  paymentSelectedIcon" id="cp1forpos_selected_icon" method_code="cp1forpos"></span>
                </dt>
                 <!-- {/foreach}  -->
                                                             
                    
                
                </dl>
            </div>
   
                       

 </div>

                        </form>                            
                        <div class="form-cashin" id="form-cashin">                                 
                            <div class="form-group">
                                <div class="text-right col-lg-8 col-md-8 col-sm-8 col-xs-8"><span>Amount Tendered: </span></div>
                                <div class="text-right col-lg-4 col-md-4 col-sm-4 col-xs-4"><input placeholder="$0.00" id="cashin_value" class="" value="" currencysymbol="$" type="text"></div>
                            </div>
                            <div class="form-group">
                                <div class="text-right col-lg-8 col-md-8 col-sm-8 col-xs-8"><span>Remain: </span></div>
                                <div class="text-right col-lg-4 col-md-4 col-sm-4 col-xs-4"><span id="remain_value"><span class="price">$0.00</span></span></div>
                            </div>
                            <div class="form-group">
                                <ul>
                                    <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <button type="button" class="btn btn-default btn-warning" id="round_down_cashin"><span class="price">$0.00</span></button>
                                    </li>
                                    <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <button type="button" class="btn btn-default btn-warning" id="cashin_fullamount"><span class="price">$0.00</span></button>
                                    </li>

                                    <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <button type="button" class="btn btn-default btn-warning" id="round_up_cashin"><span class="price">$0.00</span></button>
                                    </li>
                                </ul>     
                                <ul>
                                    <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <button type="button" class="btn btn-default numberInput" value="1">1</button>
                                    </li>
                                    <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <button type="button" class="btn btn-default numberInput" value="2">2</button>
                                    </li>
                                    <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <button type="button" class="btn btn-default numberInput" value="3">3</button>
                                    </li>
                                </ul>        
                                <ul>
                                    <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <button type="button" class="btn btn-default numberInput" value="4">4</button>
                                    </li>
                                    <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <button type="button" class="btn btn-default numberInput" value="5">5</button>
                                    </li>
                                    <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <button type="button" class="btn btn-default numberInput" value="6">6</button>
                                    </li>
                                </ul>
                                <ul>
                                    <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <button type="button" class="btn btn-default numberInput" value="7">7</button>
                                    </li>
                                    <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <button type="button" class="btn btn-default numberInput" value="8">8</button>
                                    </li>
                                    <li class="col-lg-4 col-md-4  col-sm-4 col-xs-4">
                                        <button type="button" class="btn btn-default numberInput" value="9">9</button>
                                    </li>
                                </ul>
                                <ul>
                                    <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <button id="delete_cashin" type="button" class="btn btn-default clear-number numberInput"></button>
                                    </li>
                                    <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <button type="button" class="btn btn-default numberInput" value="0">0</button>
                                    </li>
                                    <li class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                        <button type="button" class="btn btn-default numberInput" value="00">00</button>
                                    </li>        
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="checkout_buttons_area">
            <div id="options_after_place_order">
                <div class="option check_shipment" style="display:none;">
                    <ul>
                        <li>
                            <label class="shipping-order">Create shipment?</label>
                            <div class="toggle btn btn-primary" data-toggle="toggle" style="width: 35px; height: 21px; right:0px; left:80%;" onclick="toggleShippable(this)">
							<input id="create_shipment" checked="" data-toggle="toggle" class="input-text check-shipping" type="checkbox">
              <div class="toggle-group">
    							<label class="btn btn-primary toggle-on">On</label>
    							<label class="btn btn-default active toggle-off">Off</label>
    							<span class="toggle-handle btn btn-default"></span>
							</div>
							</div>
                        </li>
                    </ul>
                </div>
                <div class="option show" id="create_invoice_container" style="display:none;">
                    <ul>
                        <li>
                            <label class="shipping-order" style="display:none;">Create invoice?</label>
                            <div style="display:none;" class="toggle btn btn-primary" data-toggle="toggle" style="width: 35px; height: 21px;" onclick="toggleShippable(this)">
							<input id="create_invoice" checked="" data-toggle="toggle" class="input-text check-shipping" type="checkbox"><div class="toggle-group"><label class="btn btn-primary toggle-on">On</label><label class="btn btn-default active toggle-off">Off</label><span class="toggle-handle btn btn-default"></span></div></div>
                        </li>
                    </ul>
                </div>
            </div>
            <!--div class='col-lg-6 col-md-6 col-sm-6 col-xs-6'>
                <button type="button" class="btn btn-default" id='bt_cashin' onclick="showCashIn()">Amount Tendered</button>
            </div-->
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <button type="button" class="btn btn-warning" id="bt_place_order" onclick="webposPlaceOrder()">
                生成订单
                </button>
            </div>
        </div>
    </div>
    <div class="order-success hide" id="order-success">
        <h2 class="price-order">$<span id="success_orderGrandTotal">0.00</span></h2>
        <div class="check-order">
            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4" style="padding: 0px;"><img src="./templates/images/check_order.png"></div>
            <div class="col-lg-8 col-md-8 col-sm-8 col-xs-8" style="padding: 0px;">
                <p>生成订单成功</p>
                <p>订单号:<span id="success_orderIncrementId"></span></p>   
            </div>        
        </div>
        <!--    <div class="check-invoice">
                <p>Order fulfillment</p>
                <p>Invoice ID: #</p>
            </div>-->
        <form action="">
            <input id="success_order_id" value="" type="hidden">

            <div class="form-order">
                <input id="success_customerEmail" class="input-text form-control email" placeholder="Email" type="text">
                <button type="button" class="btn btn-warning" onclick="sendOrderToCustomerViaEmail()">发送</button>
            </div>
			<a id="piaoju" href="fpdf16/ex.php?order_id=40" target="_blank">
            <button type="button" class="btn btn-default print" id="success_print" >打印票据</button>
			</a>
        </form>

		<a href="index.php">
        <button type="button" class="btn btn-warning new-order">
         继续购物
        </button>
		</a>
    </div>
</div>
<script type="text/javascript">/* Code removed by ScrapBook */</script>       



 </div>
 
  <!--订单信息 end-->
  
  
  
    </div>

    <div id="orders_area" class="mainContainer" style="left: 100px;  width:95%; ">
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   <div id="order_section_loader" >
            <div class="img-ajax"></div>
        </div>
        <div id="order_section_not_loader" >
            <div class="img-ajax"></div>
        </div>
        <div id="order-list" class="order-list col-lg-5 col-md-5 col-sm-5 col-xs-5">
            <div class="form-search row" id="orderlist_top_bar">
                <div class="incon-menu col-lg-1 col-md-1 col-sm-1 col-xs-1" style="padding: 0px;">
				</div>
                <div class="top_bar_right col-lg-10 col-md-10 col-sm-10 col-xs-10">
                    订单列表                        
                </div>
                <div class="product_search col-lg-1 col-md-1 col-sm-1 col-xs-1" id="product_search_order">
                    <img id="search_icon" class="pointerCursor" src="./templates/images/search.png">
                </div>
            </div>
            <form id="orderlist-search-form" method="post" action="" style="display: none;">
                <ul id="search-order" class="search-order">
                    <li class="col-lg-5 col-md-5 col-sm-5 col-xs-5" style="padding: 0px;">                                
                        <input name="order-id" id="order-id" placeholder="Order Id" class="input-text form-control" type="text">
                    </li>                
                    <li class="col-lg-5 col-md-5 col-sm-5 col-xs-5" style="padding: 0px;">                                
                        <input name="name-email" id="customer-name-email" placeholder="Email/Name" class="input-text form-control" type="text">
                    </li>
                    <li id="a-search" class="col-lg-2 col-md-2 col-sm-2 col-xs-2 ">
                        <button type="button" class="btn btn-warning" id="button-orderlist-search"><span><span>Cancel</span></span></button>
                    </li>

                </ul>
				<div class="clear"></div>
				<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 5px;">
                    <div class="col-lg-5 col-md-5 col-sm-5 col-xs-5" style="padding: 0px;">
						<input placeholder="From" id="order_filter_from" value="" class="form-control webpos_datetime_picker hasDatepicker" type="text" onchange="orderlistSearch()">
					</div>                      
                    <div class="col-lg-5 col-md-5 col-sm-5 col-xs-5" style="padding: 0px;">
						<input placeholder="To" id="order_filter_to" value="" class="form-control webpos_datetime_picker hasDatepicker" type="text">
					</div>                      
                    <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2" style="padding: 0px 3px; color: rgb(255, 255, 255);">
						<label for="order_filter_need_ship">Need Ship</label>
						<input id="order_filter_need_ship" value="1" type="checkbox">
					</div>     
					
					<div class="clear"></div>					
                </div>
            </form>     
            <div id="order_list_grid">
				<input type="hidden" id="opages" value='2'>
                <div class="table-responsive" id="order_grid">
					{foreach from=$all_orderlist item=orderlist}
					<div class="create-at">
						<div class="date col-lg-12 col-md-12 col-sm-12 col-xs-12">{$orderlist.date}</div>
					</div>
					<div class="clear"></div>
						{foreach from=$orderlist.order_list item=order}
						<div class="form-row" >
							<div class="orderlist_item_wrapper">
							<div class="oinfo info {if $order.pay_status <2 && $order.order_status <2}type4{elseif $order.order_status eq 2 or $order.order_status eq 3 or $order.order_status eq 4}type2{elseif $order.order_status >4}type1{elseif $order.pay_status eq 2}type3{/if} col-lg-12 col-md-12 col-sm-12 col-xs-12" id="order_{$order.order_id}" onclick=showoinfo($(this),{$order.order_id})>
								<ul class="line1">
									<li class="order-id col-lg-6 col-md-6 col-sm-6 col-xs-6">{$order.order_sn}</li>
									<li class="price col-lg-6 col-md-6 col-sm-6 col-xs-6">{$order.total_fee_fomart}</li>
								</ul>
								<ul>
									<li class="order-id col-lg-6 col-md-6 col-sm-6 col-xs-6">{$order.consignee}</li>
									<li class="price col-lg-6 col-md-6 col-sm-6 col-xs-6">{$order.add_date}</li>
								</ul>
								<ul class="building-address">
									<li class="col-lg-12 col-md-12 col-sm-12 col-xs-12">{$order.province_name}&nbsp;{$order.city_name}&nbsp;
									{$order.district_name}&nbsp;
									{$order.address}
									</li>
								</ul>
							</div>
							<button class="bt_reload_order_items btn btn-warning" onclick="reloadOrderItems({$order.order_id})">再来一单</button>
							</div>
						</div>
						{/foreach}
						{/foreach}
				</div>
            </div>
			<script>
		
			//miracle加载订单列表
			$("#order_list_grid").scroll(function(){
				var documentTop = $(this).scrollTop();
				var windowHeight = $(this).height();
				var documentHeight = $('#order_grid').height();
				var newpage = $('#newpage').val();
				if(documentTop >= (documentHeight-windowHeight)){
					var opages = $('#opages').val();//页数
					get_order_list(opages);
				}
			})
			
			//miracle第一个订单默认显示详情
			$(".oinfo").eq(0).click();
			
			//加载列表
			function get_order_list(opages){
					var ajaxurl = "index.php?act=get_order_list";
					$.ajax({
						url:ajaxurl,
						data:{"pages":opages},
						type:"Post",
						dataType:"json",
						beforeSend:function(){
						   $('#ajaxload').show();
						   $("#ajaxload").append('<img src="templates/images/ajax-loader2.gif"  style=" position: fixed;top: 50%;left:50%;z- index:100; opacity: 1;"/>');
						},
						success:function(data){
						if(data.newpage == 1){
								$("#order_grid").append(data.content);
								$("#opages").val(data.opages);
							}
						}
					})
					$('#ajaxload').hide();
					$("#ajaxload img").remove();
				}
			
			//列表重载
			function cz_order_list(){
				var ajaxurl = "index.php?act=get_order_list";
				$.ajax({
					url:ajaxurl,
					data:{"pages":1},
					type:"Post",
					dataType:"json",
					success:function(data){
					if(data.newpage == 1){
							$("#order_grid").html(data.content);
							$("#opages").val(data.opages);
						}
					}
				})
			}
			
			//展示订单详情
			function showoinfo(obj,oid){
				obj.addClass('active');
				var ajaxurl = "index.php?act=show_oinfo";
				$.ajax({
					url:ajaxurl,
					data:{"oid":oid},
					type:"Post",
					dataType:"json",
					beforeSend:function(){
					   $('#ajaxload').show();
					   $("#ajaxload").append('<img src="templates/images/ajax-loader2.gif"  style=" position: fixed;top: 50%;left:50%;z- index:100; opacity: 1;"/>');
					},
					success:function(data){
						$("#showorderinfo").html(data.content);
						$('#ajaxload').hide();
						$("#ajaxload img").remove();
					}
				})
			}
			
			//miracle将订单的商品重新放进购物车
			function reloadOrderItems(oid){
				var ajaxurl = "index.php?act=addordergoods";
				$.ajax({
					url:ajaxurl,
					data:{"oid":oid},
					type:"Post",
					dataType:"json",
					beforeSend:function(){
					   $('#ajaxload').show();
					   $("#ajaxload").append('<img src="templates/images/ajax-loader2.gif"  style=" position: fixed;top: 50%;left:50%;z- index:100; opacity: 1;"/>');
					},
					success:function(data){
						$('#ajaxload').hide();
						$("#ajaxload img").remove();
						if(data.error>0){
							msg('danger',data.message)//处理错误信息;
						}else{
							$("#qiehuan").html(data.content);
							$("#checkout").click();
						}
						$('#ajaxload').hide();
						$("#ajaxload img").remove();
					}
				})
			}
			
			</script>
			
			<div id="order_list_loader">
				<div class="img-ajax"></div>
			</div>
        </div>
        <div id="showorderinfo" class="order-detail col-lg-7 col-md-7 col-sm-7 col-xs-7" >
			
        </div>


        
        
        
    </div>
    
    <div id="settings_area" class="mainContainer"  style="display:none; width:100%;">


    <div class="setting-left col-lg-5 col-md-5 col-sm-5 col-xs-5">
        <div class="top-content">
            <div class="img-menu col-lg-1 col-md-1 col-sm-1 col-xs-1">
			<!--
			<img class='pointerCursor' src='http://demo.magestore.com/webpos/skin/frontend/base/default/images/icon/menu.png' />
			-->
			</div>
            <div class="title-page col-lg-11 col-md-11 col-sm-11 col-xs-11"><h2>设置</h2></div>
        </div>
        <div class="content">
            <ul>
                <li class="setting general active" id="general" onclick="clickGeneral()">通用</li>
                <li class="setting account" id="account" onclick="clickAccount()">我的账户</li>
            </ul>
        </div>
    </div>
    <div class="setting-right col-lg-7 col-md-7 col-sm-7 col-xs-7" id="">
        <div class="top-content">
            <div class="title-page col-lg-12 col-md-12 col-sm-12 col-xs-12 title-general">
                <h2>通用</h2>
            </div>
            <div class="title-page col-lg-11 col-md-11 col-sm-11 col-xs-11 title-account" style="display: none;">
                <h2>我的账户</h2>
            </div>
            <div class="col-lg-1 col-md-1 col-sm-1 col-xs-1 hide hide-button">
                <button type="button" class="btn btn-default" id="save-password">保存</button>
            </div>
        </div>
        

        <div class="content-general setting-content" id="content_general">
            <h2 class="title">自动登出时间</h2>
            <form class="content-box" method="" action="">                
                <div class="box box1">
                    <div class="check check1">                    
                        <input class="hide" type="checkbox">
                        <label>2分钟</label>
                        <span class="checkicon " id="2" logout="2"></span>
                    </div>
                    <div class="check check2">                    
                        <input class="hide" type="checkbox">
                        <label>5分钟</label>
                        <span class="checkicon " id="5" logout="5"></span>
                    </div>
                    <div class="check check3">                    
                        <input class="hide" type="checkbox ">
                        <label>10分钟</label>
                        <span class="checkicon " id="10" logout="10"></span>
                    </div>
                    <div class="check check4">                    
                        <input class="hide" type="checkbox">
                        <label>15分钟</label>
                        <span class="checkicon " id="15" logout="15"></span>
                    </div>
                    <div class="check check5">                    
                        <input class="hide" type="checkbox">                        
                        <label>永不</label>
                        <span class="checkicon glyphicon glyphicon-ok haschoose" id="-1" logout="0"></span>
                    </div>                    
                </div>                           
            </form>
                        <h2 class="title">刷新本地缓存</h2>
                <div id="flush_cache">
                    <button id="change_session">提交修改</button>
                </div>
        </div>

<script type="text/javascript">
$('#change_session').on('click',function(){change_session()});
</script>

<div class="content-myaccount" style="display: none;" id="content_account">
            <form action="" id="editUserInfo">
                <h2 class="title">账户信息</h2>              
                <div class="account-information">
                    <div class="box">
                        <label>用户昵称</label>
                        <input name="firstname" id="username" class="form-control input-text" placeholder="Name" value="{if $display_name}{$display_name}{else}你的名字{/if}" type="text">
                    </div>
                    <div class="box last">
                        <label>电子邮箱</label>
                        <input name="emailaddress" id="emailaddress" class="form-control input-text" placeholder="Email Address" value="{if $email}{$email}{/if}" type="text">
                    </div>
                    <input name="userid" id="userid" value="3" type="text" hidden="hidden">
                </div>
                <h2 class="title">修改密码</h2>
                <div class="change-password">
                    <div class="box">
                        <label>原密码</label>
                        <input name="oldpassword" class="form-control input-text" placeholder="原密码" id="oldpassword" type="password">
                    </div>
                    <div class="box">
                        <label>新密码</label>
                        <input name="newpassword" class="form-control input-text" placeholder="新密码" id="newpassword" type="password">
                    </div>
                    <div class="box last">
                        <label>确认密码</label>
                        <input name="confirmpassword" class="form-control input-text" placeholder="再次输入密码" id="confirmpassword" type="password">
                    </div>
                </div>
            </form>

            <div id="permissionInfo">
                <h2 class="title">角色信息</h2>
                <div class="permission-information">
                    <div class="box">
                        <label>角色: </label>
                        <span>{$role}</span>
                    </div>
                    <div class="box last box-permission">
                        <label id="box-permission" class="form-control">
                            <span>权限: </span>
<!--                            <span class="glyphicon glyphicon-chevron-up hide" aria-hidden="true"></span>
                            <span class="glyphicon glyphicon-chevron-down" aria-hidden="true"></span>-->
                        </label>
                        
                        <span id="list-permission" style="clear: both;"><p>所有权限</p></span>
                    </div>
                </div>
            </div>
             <button id="change_profile" style="padding: 13px 0px;border-radius: 9px;border: medium none;color: rgb(255, 255, 255);
background-color: rgb(43, 75, 123);background-size: contain;font-size: 14px;outline: 0px none;width: 100%;">提交修改</button>
        </div>

<script type="text/javascript">
$('#change_profile').on('click',function(){change_profile()});
</script>

        
    </div>


</div>
</div>                </div>
            </div>
        </div>
                        

    </div>
</div></div>

<script>
			
				function bt_desc_qty(gid){
					if (gid == 0) 
					{
						customer_goods_minus(gid);
					}
					else
					{
						delToCart(gid);	
					}
						
						
					var val=$('#editpopup_product_qty'+gid).val();
					val=parseInt(val);
					
					if(val>0){
					   var val2=val-1;
					   $('#editpopup_product_qty'+gid).val(val2);	
					}  
					
					 //$('#catnum'+gid).text(val2);
					 //$('#catnum'+gid).show();
				}
				
				function bt_inc_qty(gid){
					if (gid == 0) 
					{
						customer_goods_plus(gid);
					}else
					{
						addToCart(gid);
					}
					var val=$('#editpopup_product_qty'+gid).val();
					 val=parseInt(val);
					var val1=val+1
					$('#editpopup_product_qty'+gid).val(val1);			
				}
				
				
</script>


<div id="mm-blocker" class="mm-slideout"></div>

<!--信息提示框 start-->
<div id="toaster" class="toaster" style="position: fixed; top: 50px; left: 50%; margin-left: -30vw; width: 60vw; z-index: 50000; display:none" >
    <div class="alert alert-dismissible" role="alert" style="display: block;">
    <button type="button" class="close" data-dismiss="alert">
    <span  id="msgclose" >×</span>
    <span style="display: none;">Close</span>
    </button>
    <span class="title" style="font-weight: bold;">Error</span>: 
    <span class="message">Please add product to cart to add cart discount</span>
    </div>
    
 </div>
<!--信息提示框 end-->
<!--ajax 加载 start-->
<div id="ajaxload" style="float: left;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0px;
    left: 0px;
    z-index: 50;
    background: rgb(239, 239, 239) none repeat scroll 0% 0%;
    opacity: 0.90;display: none;">
  
</div>
<!--ajax 加载 end-->



<div id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all">
  
</div>



<script>
  /*显示分类树*/

   function showcat(){
      $('html').toggleClass('mm-opened mm-blocking mm-background mm-opening'); 
      $('#menu2').toggleClass('mm-current mm-opened');

     var menu2= document.getElementById("menu2");
     menu2.style.display="block";
     menu2.style.width="346px";
     menu2.style.background="#fff";
   document.getElementById("popup-customer").style.display="block";
   //hjl  让屏幕显示100%  宽高
   document.getElementById("webpos_overlay").style.display="block";
   }
   
   
   
   
   
  function closecat() {
       
        var menu2= document.getElementById("menu2");
        menu2.style.display="none";
         menu2.style.top=0;
  }
  function showlogin(){
      var login_obj=document.getElementById("login-webpos");
      var classVal = login_obj.getAttribute("class");
      $('#login_overlay').toggleClass('hide');
      classVal = classVal.replace(" hide","");
     login_obj.setAttribute("class",classVal );
   
  }
  
  //过滤子元素中的input 元素
   
      function del_empyt(elem){  
  
        var elem_child = elem.childNodes;//得到参数元素的所有子元素  
  
        for ( var i =  elem_child.length - 1; i >= 0; i--) { //遍历子元素  
           
                if (elem_child[i].nodeType == 3 && !/\S/.test(elem_child[i].nodeValue)) {        
        
                    elem.removeChild(elem_child[i]);  
                } 
    
        }  
    
    return elem_child;
    
    
    } 

  
   /*
   hjl   鼠标点击属相值后特效
   参数为：属性的ID，属性的name,商品属性ID ，属性的值
   功能：把选择的商品属性ID放到input 的value上
   */
   
   
   function selectProductOption(attr_id,name,gAttr_id,val,obj){
          		 		  
		   
		  
		  
		  $('#guige'+gAttr_id).text(attr_id);
		  
		  //var guige =  $('#guige').html();
		
			
		  
		   var ul=$(obj).parent(); //找到父级元素的ID
         var lis=ul.find('li');
         var input=ul.find('input');

        //console.log(lis.find('span'));
         var spans=lis.find('span');
         for(var i=0;i<spans.length;i++){
             if(!$(spans[i]).hasClass('hide')){
                $(spans[i]).addClass('hide');
             }
           

         }
         $(obj).find('span').removeClass('hide');
         $(input).val(gAttr_id);
         $(input).attr('optionlabel',val);
		 
		
		 
         /*   var ul_id=attr_id+"_"+name+"_values";  

            var input_id=attr_id+"_"+name+"_value"; 
            
            var ulobj=document.getElementById(ul_id);
            var liobjs=del_empyt(ulobj);  //过滤掉空白节点
            
            //改变背景，和隐藏对号图标  
            for(var k=0;k<liobjs.length;k++){
             if(liobjs[k].tagName == "LI"){   
               liobjs[k].style.color="#000";
               liobjs[k].style.background="#fff";
               var span=liobjs[k].childNodes[1];

               var classVal = span.getAttribute("class");
               if(!/hide/.test(classVal)){
                classVal = classVal.concat(" hide");
               }
               span.setAttribute("class",classVal);
             }
            }
    
            // 改变当前点击的属性值的背景和显示对号
            for(var j=0;j<liobjs.length;j++){
               if(liobjs[j].getAttribute("value")==gAttr_id && liobjs[j].tagName=="LI"){
                  liobjs[j].style.background="#3380F9";
                  liobjs[j].style.color="#fff"
                  var classVal1=liobjs[j].childNodes[1].getAttribute("class");
                  classVal1 = classVal1.replace(" hide","");
                  liobjs[j].childNodes[1].setAttribute("class",classVal1);
                  

               }

            }
          var inputObj= document.getElementById(input_id);
         
          inputObj.value=gAttr_id;
          inputObj.setAttribute("optionlabel",val);   */
          

   }
   
   
  /*显示评论框*/ 
   function showhideOrderCommnent(id_str){
      document.getElementById(id_str).style.display="block";
    
     document.getElementById("webpos_overlay").style.display="block";
   }
   
   
   /*显示添加客户弹框*/
   
   function showCustomers(){
   
    document.getElementById("popup-customer").style.display="block";
    document.getElementById("popup-customer").style.zIndex=15;
    //计算位置
    var curleft=$('#add-customer').offset().left-document.documentElement.scrollLeft;
    var curtop=$('#add-customer').offset().top-document.documentElement.scrollTop;
    if(curleft>200){
       var left = curleft-320;
     }else{
       var left=$('#add-customer').parent().width()+110;
       $('#popup-customer').addClass('onCheckout');

     }
   
    $('#add-customer').addClass('active');
	
    //$('#btn-create').attr('disabled','true');

    document.getElementById("popup-customer").style.top="88px";
    document.getElementById("popup-customer").style.left=left+'px';
    document.getElementById("webpos_overlay").style.display="block";
   
   }
   
   
   /*关闭页面上所有的弹框*/
   
   function overlayClicked(){
    
   
    //关闭 订单评论弹窗
    if(document.getElementById("order-comment").style.display=="block"){
       document.getElementById("order-comment").style.display="none";
      
    }
    //关闭 添加顾客弹框
    if(document.getElementById("popup-customer").style.top=="88px"){
      
       document.getElementById("popup-customer").style.top="-100vh";
       document.getElementById("popup-customer").style.left="35vw";
    
     
    }
    //关闭分类弹窗
    
    if(document.getElementById("menu2").style.display=="block"){
      
      
     document.getElementById("menu2").style.display="none"
      $('html').toggleClass('mm-opened mm-blocking mm-background mm-opening'); 
      $('#menu2').toggleClass('mm-current mm-opened');
    
     
    }
    //关闭选择规格弹窗
    
    var ggobjs=getClassNames("product_options","div");
    
     for(var i=0;i<ggobjs.length; i++){
       if(ggobjs[i].style.display=="block"){
       ggobjs[i].style.display="none";
     }
     
       
     }
     
    //关闭 评论框 
   if(document.getElementById("before_hold_popup").getAttribute("class")=="show"){
      document.getElementById("before_hold_popup").setAttribute("class","hide");
   }
    
      // 关闭添加购物车折扣弹窗
      if(document.getElementById("discount-webpos").style.display=="block"){
         
          document.getElementById("discount-webpos").style.display="none";
      }

     //关闭 现金抽屉弹框
      if(document.getElementById("till_area").style.top=="46px"){
         document.getElementById("till_area").style.top="1001vh"
      }

     //关闭购物车选择数量弹窗
      $('#edit_cart_item_popup .edit_cart_item_popup').css('height','auto');
      $('#edit_cart_item_popup .edit_cart_item_popup').remove();
      $('#edit_cart_item_popup').css('opacity',0);

      
       $('.custom_price_tab').css('right','-100%');

       $('#webpos_cart').find('div[class$="active"]').removeClass('active');

     document.getElementById("before_hold_popup").setAttribute("class","hide");
     document.getElementById("webpos_dark_overlay").style.display="none";


      //关闭遮罩层
    
     document.getElementById("webpos_overlay").style.display="none";
    
   }

   // 订单页面处理关闭弹窗的函数
  function cancelAddCustomer(){
    
     //关闭 发送邮件弹窗
      $('.send-email').toggleClass("hide");
      $('#pos_order_container_sendemail_overlay').css("display","none");

  }

function cancelRefundPopup(){

  $('#refund_popup').toggleClass("hide");
  $('.bg-fade').css("display","none");

}


 $('#refund_popup').find("button").eq(0).click(function(){
   $('#refund_popup').toggleClass("hide");
   $('.bg-fade').css("display","none");
 });


  


 function shipOrder(orderId) {
      $.ajax({
           type: "GET",
           url: "index.php?act=ship",
           data: {'order_id':orderId},
           dataType: 'json', 
           success: function(msg){
             alert(msg);
           }
       });


       
    }

  //miracle退款操作
   function refundOrder(oid,status){
		$('#comment_refund').val('');
		$('#ajust_refund').val('');
		$('#ajust_fee').val('');
   
		if(status==0 || status==4){
			msg('danger','该订单已经退款或者还未付款！');
			return;
		}
		
		var ajaxurl = "index.php?act=refundorderinfo";
		$.ajax({
			url:ajaxurl,
			data:{"oid":oid},
			type:"Post",
			dataType:"json",
			success:function(data){
				if(data.error>0){
					msg('danger',data.message)//处理错误信息;
				}else{
					$("#refund_popup").html(data.content);
					//$("#order_"+oid).click();//重载订单详情
				}
			}
		})
		$('#refund_popup').toggleClass("hide");
		$('.bg-fade').css("display","block");
		
   }
   
   /*显示自定义营销页面*/
   
  function  showCustomersale(){
  
    var cus_sales=getClassNames("customer-sale","div");
   
    cus_sales[0].style.display="block";
    
    document.getElementById("customer-sale-btn").style.display="none";
    document.getElementById("cancel-sale-btn").style.display="block";
    document.getElementById("numberProduct").style.display="none";
    
    document.getElementById("offline").style.display="none";
    
    document.getElementById("productPager").style.display="none";
    document.getElementById("customer-sale-btn").style.display="none";
    document.getElementById("till_info").style.display="none";

    
  }
  
  
  /*关闭自定义营销页面*/
  function cancelCustomersale(){
  
   var cus_sales=getClassNames("customer-sale","div");
   
    cus_sales[0].style.display="none";
    
    document.getElementById("customer-sale-btn").style.display="block";
    document.getElementById("cancel-sale-btn").style.display="none";
    document.getElementById("numberProduct").style.display="block";
    
    document.getElementById("offline").style.display="block";
    
    document.getElementById("productPager").style.display="block";
    document.getElementById("customer-sale-btn").style.display="block";
    document.getElementById("till_info").style.display="block";
  }
  
  
  
  
  
  
  
  /*切换配送状态*/
   function toggleShippable(obj){
     var classVal = obj.getAttribute("class");
     if(classVal=="toggle btn btn-default off"){
       classVal = classVal.replace("toggle btn btn-default off","toggle btn btn-primary");
         obj.setAttribute("class",classVal );
     
     }else{
     
        classVal = classVal.replace("toggle btn btn-primary","toggle btn btn-default off");
          obj.setAttribute("class",classVal );
     }
      
   
   }
   
   
   function showBeforeHoldPopup(){
   
      var obj=document.getElementById("before_hold_popup");
      var classVal = obj.getAttribute("class");
    
      classVal = classVal.replace("hide","show");
      obj.setAttribute("class",classVal );
      document.getElementById("webpos_dark_overlay").style.display="block";
    
   }

   function hideBeforeHoldPopup(){
   
      var obj=document.getElementById("before_hold_popup");
      var classVal = obj.getAttribute("class");
    
      classVal = classVal.replace("show","hide");
      obj.setAttribute("class",classVal );
      document.getElementById("webpos_dark_overlay").style.display="none";
    
   }
   
   
   
   /*function saveCart(){
      document.getElementById("product-left").style.display="none";
     var obj=document.getElementById("order_info");
    var classVal = obj.getAttribute("class");
    
       classVal = classVal.replace("orderHide","");
     
       obj.setAttribute("class",classVal );
     obj.style.width="50%";
     
     
     
    document.getElementById("bt_hold_order").style.display="none";
    
      document.getElementById("bt_checkout").style.display="none";
     document.getElementById("add-discount").style.display="none";

     document.getElementById("customer_loader").style.display="none";
    
     
   
   }*/



   
   function nextSibling(node) {
      var tempLast = node.parentNode.lastChild;
      if (node == tempLast) return null;
      var tempObj = node.nextSibling;
      while (tempObj.nodeType != 1 && tempObj.nextSibling != null) {
        tempObj = tempObj.nextSibling;
      }
      return (tempObj.nodeType==1)? tempObj:null;
    }
  //迭代 去除非空子元素
    function firstChild(node) {
      var tempObj= node.firstChild;
    while (tempObj.nodeType != 1 && tempObj.nextSibling != null) {
        tempObj = tempObj.nextSibling;
      }
    return tempObj;
    
    }




  
function printOrder(link) {
        if (isOffline() == true) {
            var orderId = '#######';
            var subtotal = convertLongNumber(localGet('lastorder_grandTotal'));
            var grandtotal = convertLongNumber(localGet('lastorder_grandTotal'));
            var items = localGet('lastorder_items_table');
            var order_created = localGet('lastOrderDate');
            var itemsData = [];
            var shipping = cashforpos = change = ccforpos = cp1forpos = cp2forpos = codforpos = balance = tax = 0;
            var customer_name = comment = shipping_method = payment_method = "";
            var last_pending_order_key = localGet('last_pending_order');
            if (last_pending_order_key != null) {
                var orderData = getPendingOrder(last_pending_order_key);
                if (orderData != null && orderData != '') {
                    shipping_method = getShippingTitle();
                    payment_method = getPaymentMethodLabel(orderData.payment_method);
                    customer_name = orderData.customerInCart.firstname + ' ' + orderData.customerInCart.lastname;
                    if (orderData.comment) {
                        comment = orderData.comment;
                    }
                    if (orderData['payment[cashforpos_ref_no]']) {
                        cashforpos = orderData['payment[cashforpos_ref_no]'];
                    } else {
                        if (orderData['cashin']) {
                            cashforpos = orderData['cashin'];
                        }
                    }
                    if (orderData['payment[ccforpos_ref_no]']) {
                        ccforpos = orderData['payment[ccforpos_ref_no]'];
                    }
                    if (orderData['payment[codforpos_ref_no]']) {
                        codforpos = orderData['payment[codforpos_ref_no]'];
                    }
                    if (orderData['payment[cp1forpos_ref_no]']) {
                        cp1forpos = orderData['payment[cp1forpos_ref_no]'];
                    }
                    if (orderData['payment[cp2forpos_ref_no]']) {
                        cp2forpos = orderData['payment[cp2forpos_ref_no]'];
                    }
                    if (convertLongNumber(cashforpos) > convertLongNumber(grandtotal)) {
                        change = convertLongNumber(cashforpos) - convertLongNumber(grandtotal);
                    }
                    if (orderData.payment_method == 'multipaymentforpos') {
                        if (convertLongNumber(codforpos) > 0) {
                            balance = convertLongNumber(codforpos);
                        } else {
                            balance = convertLongNumber(grandtotal) - convertLongNumber(cashforpos) - convertLongNumber(ccforpos) - convertLongNumber(cp1forpos) - convertLongNumber(cp2forpos);
                        }
                    }
                }
            }
            if (typeof items != 'undefined' && items.length > 0) {
                $D.each(items, function (key, item) {
                    var itemObject = {};
                    itemObject['price-container'] = convertLongNumber(item.price);
                    itemObject['qty'] = convertLongNumber(item.qty);
                    itemObject['name'] = item.name;
                    itemObject['sku'] = item.options;
                    itemObject['tax'] = convertLongNumber(item.tax);
                    itemObject['row-total'] = convertLongNumber(item.subtotal);
                    itemsData.push(itemObject);
                });
            }
            var receiptData = {
                items: itemsData,
                subtotal: subtotal,
                tax: tax,
                shipping: shipping,
                grandtotal: grandtotal,
                cashforpos: cashforpos,
                change: change,
                ccforpos: ccforpos,
                cp1forpos: cp1forpos,
                cp2forpos: cp2forpos,
                codforpos: codforpos,
                balance: balance,
                customer_name: customer_name,
                order_number: orderId,
                order_date: order_created,
                shipping_method: shipping_method,
                payment_method: payment_method,
                comment: comment

            };
            var offlineReceipt = new webposReceipt('offline_receipt_template', receiptData);
            offlineReceipt.print();
        } else
            print_popup = window.open(link, "_blank", "scrollbars=yes, resizable=yes, width=500, height=700");
    }



  function showOrder(order_id,str){
    
     $.ajax({
           type: "GET",
           url: "index.php?act=showOrder",
           data: {'order_id':order_id},
           dataType: 'json', 
           success: function(msg){

             $('#order_detail_grandtotal').html(msg.price);
           }
       });

  }

 //加载订单中的商品到购物车
  function reloadOrderItems2(order_id){
     $.ajax({
           type: "GET",
           url: "index.php?act=reloadOrderItems",
           data: {'order_id':order_id},
           dataType: 'json', 
           success: function(msg){
               alert(msg);
               document.getElementById("orders_area").style.display="none";
               document.getElementById("orders_area").style.zIndex=1;
             
           }
       });
   

  }

  //miracle执行退款
  function processRefundOrder(oid){
		//判断数据
		var isnumber =/^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$/;
		var ordernode = $('#comment_refund').val();
		var ajust_refund = $('#ajust_refund').val();
		var ajust_fee = $('#ajust_fee').val();

		if(ajust_refund!='' && !isnumber.test(ajust_refund)){
			msg('danger','请输入正确的差价。');
			return;
		}
		if(ajust_fee!='' && !isnumber.test(ajust_fee)){
			msg('danger','请输入正确的附加费。');
			return;
		}

		var ajaxurl = "index.php?act=refundorderaction";
		$.ajax({
			url:ajaxurl,
			data:{"oid":oid,"ordernode":ordernode,"ajust_refund":ajust_refund,"ajust_fee":ajust_fee},
			type:"Post",
			dataType:"json",
			success:function(data){
				if(data.error>0){
					msg('danger',data.message)//处理错误信息;
				}else{
					msg('success','退款操作成功')//处理错误信息;
					$('#order_bt_cancel').attr('disabled',true);
					$("#order_"+oid).click();//重载订单详情
					cancelRefundPopup();
				}
			}
		})
	}
	//miracle取消订单操作
	function cancelorder(oid,status){
		if(status>=2){
			msg('danger','该订单不能取消');
			return;
		}
		if(oid<=0 || oid==""){
			msg('danger','该订单号不存在');
			return;
		}
		if(confirm('确定取消该订单吗？')){
			var ajaxurl = "index.php?act=cancelorderaction";
			$.ajax({
				url:ajaxurl,
				data:{"oid":oid},
				type:"Post",
				dataType:"json",
				success:function(data){
					if(data.error>0){
						msg('danger',data.message)//处理错误信息;
					}else{
						msg('success','取消订单操作成功')//处理错误信息;
						$('#order_bt_cancel').attr('disabled',true);
						$("#order_"+oid).click();//重载订单详情
					}
				}
			})
		}
		
	}

	//miracle发货
	function shipping_order(oid){
		if(oid<=0 || oid==""){
			msg('danger','该订单号不存在');
			return;
		}
		
		var ajaxurl = "index.php?act=shipping_order";
			$.ajax({
				url:ajaxurl,
				data:{"oid":oid},
				type:"Post",
				dataType:"json",
				success:function(data){
					if(data.error>0){
						msg('danger',data.message)//处理错误信息;
					}else{
						msg('success','发货成功')//处理错误信息;
						$('#order_bt_ship').attr('disabled',true);
						$("#order_"+oid).click();//重载订单详情
					}
				}
			})
		}

/*function overlayClicked(){
   document.getElementById("before_hold_popup").setAttribute("class","hide");
   document.getElementById("webpos_dark_overlay").style.display="none";

}*/


    
  

   /*function showdd(obj){

      var dt=obj.parentNode; 
      //遍历隐藏所有打开的
         var dl=dt.parentNode;
     var childs=dl.childNodes
     
     
         for(var i=0;i<childs.length;i++){
         if(childs[i].tagName=="DD"){
          childs[i].style.display="none";
        var subul=firstChild(childs[i]);
        
        subul.style.display="none";
        
        
       }
     }
    
    var dd=nextSibling(dt); 
       if(dd.tagName !="STYLE"){
      var ul=firstChild(dd);
      dd.style.display="block";
            ul.style.display="block";
       }
    

   }*/
   
   
  $(function(){
           //分类树效果 
  $('.mm-listview li .mm-next').on('click',function(){
    
      var substr=$(this).attr('data-target');
    $(substr).removeClass("mm-hidden");
    $(substr).addClass("mm-highest mm-current mm-opened");
    
    });
    
    $('.mm-btn').click(function(){
     $(this).parent().parent().removeClass('mm-highest mm-current mm-opened').addClass('mm-hidden');

    });
    //  hjl  添加购物车折扣效果 
  /* $('#add-discount').click(function(){

     var num= $('#webpos_cart div').length;
      if(num==0){
         $('#toaster').show();
         msg('danger','This feature is not available for offline mode');
      }else{ 
        $('#discount-webpos').show();
         document.getElementById("webpos_overlay").style.display="block";   
      }
     
     
      
    });  */
	
	$('#main_container').delegate("#add-discount",'click',function(){

     var num= $('#webpos_cart div').length;
      if(num==0){
         $('#toaster').show();
         msg('danger','需先添加商品');
      }else{ 
        $('#discount-webpos').show();
         document.getElementById("webpos_overlay").style.display="block";   
      }
     
     
      
    });
	
     /*优惠 上面两个大按钮 按钮切换*/
      
      $('.choose-discount button').click(function(){
        //$(this).parent().find('button').toggleClass("btn1");
     
          $(this).siblings() .removeClass('btn2').addClass('btn1');
           
         

         if($(this).hasClass("btn1")){
            
               $(this).removeClass("btn1").addClass('btn2');
         }
 
      
         var index=$(this).index();
         $('.form-coupon').hide();
         $('.forms-discount').hide();
        if(index==0){
           $('.forms-discount').show();
          
        }else{
         $('.form-coupon').show();
        
        }
      
      
      });

    /*优惠 弹窗  下面的两个小按钮  切换 效果*/

    $('#discount-webpos .discount-type button').click(function(){
      $(this).siblings() .removeClass('btn2').addClass('btn1');

      if($(this).hasClass('btn1')){
        $(this).removeClass('btn1');
      
       $(this).addClass('btn2');

      }

      var index=$(this).index();
     
      if(index==1){
       $('#txtScream1').attr('placeholder','0.00')

      }else{
      $('#txtScream1').attr('placeholder','0.00%')

      }



    });







      /*购物车商品 选择数量弹窗 折扣类型切换*/

      $("#discount-type button").click(function(){

      
      $(this).siblings() .removeClass('btn2').addClass('btn1');


        if($(this).parent().find("button").hasClass('btn1')){

           $(this).removeClass("btn1").addClass('btn2');

        }
      
      
        
       
      
      }); 



      
   //hjl  关闭信息提示框

     $('#msgclose').click(function(){
      
       $(this).parent().parent().parent().hide();
      


     });

   //hjl   页面底部钱箱默认按钮 效果
    $('#till_info').click(function(){
      $('#till_area').css('top','46px');
       document.getElementById("webpos_fixed_overlay").style.display="block";   

    });



   //hjl  删除购物车中的按钮(已经没用)
   $('#webpos_cart .delete').on('click',function(){
     
      $(this).parent().parent().remove();
   

   });

  //选择支付方式

  $('#checkout-payment-method-load dt label').on('click',function(){
     $('#shipping_area .hidding').hide();
    $('#checkout-payment-method-load dd').hide();
    $(this).parent().next().show();    //让dd显示 
    $(this).parent().next().find("ul").show();  //让dd 里的ul 显示
    $('#checkout-payment-method-load span[id$="selected_icon"]').addClass('hide');
    $(this).parent().find("span:last").removeClass('hide');
   });

   // hjl  登录框切换
     $('#login-webpos').toggleClass('hide');
     $('#login_overlay').toggleClass('hide');



            
            
    }); //页面加载完成 end
    
    
    
    
   
   
   


</script>


</body>
</html>
